Add FeatureFlag helper methods to DatabaseHelper#3087
Merged
Conversation
8d26165 to
30db602
Compare
Introduced overloaded helper methods `persistFeatureFlag` in `DatabaseHelper` to simplify the creation and persistence of `FeatureFlag` entities in test setups. 1. `persistFeatureFlag(FeatureName, FeatureStatus)`: Persists a feature flag with a single status starting from the Unix Epoch (`START_INSTANT`). 2. `persistFeatureFlag(FeatureName, FeatureStatus, Instant, FeatureStatus)`: Persists a feature flag with an initial status at `START_INSTANT` and a subsequent transition at a specified time. Refactored 11 occurrences of manual 1-transition flag creation and 5 occurrences of 2-transition flag creation across the test suite to use these new helpers, significantly reducing boilerplate and improving test readability. TAG=agy CONV=583b8a23-9fe5-476d-ac35-aeba7b218eb0
30db602 to
939c3ea
Compare
jicelhay
approved these changes
Jun 16, 2026
jicelhay
left a comment
Collaborator
There was a problem hiding this comment.
@jicelhay reviewed 11 files and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on CydeWeys).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduced overloaded helper methods
persistFeatureFlaginDatabaseHelperto simplify the creation and persistence ofFeatureFlagentities in test setups.persistFeatureFlag(FeatureName, FeatureStatus): Persists a feature flag with a single status starting from the Unix Epoch (START_INSTANT).persistFeatureFlag(FeatureName, FeatureStatus, Instant, FeatureStatus): Persists a feature flag with an initial status atSTART_INSTANTand a subsequent transition at a specified time.Refactored 11 occurrences of manual 1-transition flag creation and 5 occurrences of 2-transition flag creation across the test suite to use these new helpers, significantly reducing boilerplate and improving test readability.
TAG=agy
CONV=583b8a23-9fe5-476d-ac35-aeba7b218eb0
This change is