-
Notifications
You must be signed in to change notification settings - Fork 11
chore: adds TestDataV2 to implement Synchronizer #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
lib/sdk/server/src/main/java/com/launchdarkly/sdk/server/integrations/TestData.java
Outdated
Show resolved
Hide resolved
| * @param condition condition to poll; when it returns true, this method returns | ||
| * @throws InterruptedException if the current thread is interrupted while waiting | ||
| * @throws AssertionError if the condition does not become true before the timeout | ||
| */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reviewers: Not sure if these helpers are really warranted, but it seems to make usability better.
lib/sdk/server/src/main/java/com/launchdarkly/sdk/server/integrations/TestDataV2.java
Show resolved
Hide resolved
lib/sdk/server/src/test/java/com/launchdarkly/sdk/server/integrations/TestDataV2Test.java
Outdated
Show resolved
Hide resolved
lib/sdk/server/src/main/java/com/launchdarkly/sdk/server/integrations/TestDataV2.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
lib/sdk/server/src/main/java/com/launchdarkly/sdk/server/integrations/TestData.java
Show resolved
Hide resolved
| case INITIALIZING: | ||
| default: | ||
| // VALID and INITIALIZING do not map to FDv2 status events (same as DataSourceSynchronizerAdapter) | ||
| statusResult = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For valid do we need to have a "none" changeset push?
Requirements
Note
Medium Risk
Introduces a new FDv2 synchronizer and queues/async delivery behavior; while test-focused, correctness of change set ordering/versioning can affect client initialization and update semantics in tests.
Overview
Adds
TestDataV2, a new in-memory, dynamically updatable test data provider that implements the FDv2SynchronizerAPI, emitting an initial fullChangeSetfollowed by incremental partial change sets forupdate()/delete(), and supporting simulated status events plus anawaitPropagationhelper.Refactors
TestData.FlagBuilderto be reusable byTestDataV2(package-visible constructors and full copy of sampling/migration fields), and tightensTestDataTestexpectations around flag versioning; adds comprehensiveTestDataV2Testcoverage for initialization, updates, deletes, and basic flag config behaviors.Written by Cursor Bugbot for commit 818327a. This will update automatically on new commits. Configure here.