Fix flaky feature context integration tests - #3833
Merged
kikoveiga merged 1 commit intoSep 4, 2026
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
kikoveiga
force-pushed
the
kikoveiga/rum-16470/fix-feature-context-test-flake
branch
from
September 4, 2026 16:56
d908321 to
0c8a157
Compare
🎉 All green!🧪 All tests passed 🔄 Datadog retried 2 tests - 2 passed on retry 🔄 Datadog auto-retried 2 jobs - 2 passed on retry 🎯 Code Coverage (details) 🔗 Commit SHA: 0c8a157 | Docs | View more details | Give us feedback! |
0xnm
approved these changes
Sep 4, 2026
kikoveiga
deleted the
kikoveiga/rum-16470/fix-feature-context-test-flake
branch
September 4, 2026 17:33
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.
What does this PR do?
Makes the concurrent feature-context integration tests use disjoint key namespaces for each writer. The change is applied consistently to the add, modify, and remove scenarios in both FeatureSdkCoreTest and InternalSdkCoreTest.
Motivation
The two Forge-generated maps could independently produce the same key. The expected map was built with Kotlin map addition, which deterministically gives precedence to the second map, while the actual updates run concurrently and can validly complete in either order.
For example, both maps generated the key k in the observed failure. The assertion expected the value from the second map, but the first writer acquired the lock last, so its value correctly won. This made the atomicity test fail even though the production locking behavior was correct.
Using first_ and second_ key prefixes removes this accidental same-key conflict so the tests measure atomic updates rather than nondeterministic last-writer-wins behavior.
Additional Notes
This is a test-only change; production feature-context behavior is unchanged.
Validation:
Review checklist (to be filled by reviewers)