Skip to content

Fix flaky feature context integration tests - #3833

Merged
kikoveiga merged 1 commit into
developfrom
kikoveiga/rum-16470/fix-feature-context-test-flake
Sep 4, 2026
Merged

Fix flaky feature context integration tests#3833
kikoveiga merged 1 commit into
developfrom
kikoveiga/rum-16470/fix-feature-context-test-flake

Conversation

@kikoveiga

Copy link
Copy Markdown
Contributor

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:

  • reliability core integration-test sources compile
  • reliability core ktlint checks pass
  • all six affected instrumentation tests pass on an API 37 emulator

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@kikoveiga
kikoveiga requested review from a team as code owners September 4, 2026 16:54
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-04T16:57:19.171087Z 0c8a157 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kikoveiga
kikoveiga force-pushed the kikoveiga/rum-16470/fix-feature-context-test-flake branch from d908321 to 0c8a157 Compare September 4, 2026 16:56
@kikoveiga kikoveiga changed the title RUM-16470: Fix flaky feature context integration tests Fix flaky feature context integration tests Sep 4, 2026
@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Sep 4, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🔄 Datadog retried 2 tests - 2 passed on retry View in Datadog

🔄 Datadog auto-retried 2 jobs - 2 passed on retry View in Datadog

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 71.70% (-0.03%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 0c8a157 | Docs | View more details | Give us feedback!

@kikoveiga
kikoveiga merged commit 0008382 into develop Sep 4, 2026
26 checks passed
@kikoveiga
kikoveiga deleted the kikoveiga/rum-16470/fix-feature-context-test-flake branch September 4, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants