Repository navigation
test(e2e): Widen WebView demo-page trace poll window to de-flake e2e - #6950
Merged
Merged
Conversation
The WebView demo page polls for the injected `sentry-trace` meta tag to read it back and flip the on-device "WebView trace connected" status the `webViewTraceConnection` e2e asserts on. The window was 3s (30 * 100ms). On Android the injection is asynchronous, and a cold-start release build on a slow CI emulator can land it later than on a local device, so the page intermittently declared the trace "not injected" before it arrived — flaking the e2e (timed out at 30s) even though the feature works. Widen the poll window to 20s, still well within the e2e's 30s wait on the connected status. Sample/e2e-only; no SDK change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
📲 Install BuildsAndroid
|
antonis
marked this pull request as ready for review
October 27, 2026 10:50
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.
📢 Type of change
📜 Description
De-flakes the
webViewTraceConnectionAndroid e2e. The sample's WebView demo page polls for the injectedsentry-tracemeta tag, reads it back, and flips the on-device "WebView trace connected" status the e2e asserts on. That poll window was 3s (30 × 100ms). On Android the injection is asynchronous (react-native-webviewinjects viaonPageStarted+evaluateJavascript), and a cold-start release build on a slow CI emulator can land the injection later than on a local device — so the page intermittently declared the trace(none — not injected)before it arrived and the e2e timed out at 30s, even though the feature works.Widen the poll window to 20s (
maxTries = 200), still well within the e2e's 30sextendedWaitUntilon the connected status, so a late injection is caught instead of prematurely declared missing.Sample/e2e-only — no SDK change, no public API change, no CHANGELOG entry.
💡 Motivation and Context
webViewTraceConnection.testflaked on CI (e.g. runs on unrelated PRs) withAssertion is false: "WebView trace connected.*". Confirmed a flake, not a regression: the identical main commit passes it in ~7s; passing runs connect fast while the failure timed out at the full 30s (race-loss signature). The change only affects the sample's readback loop, not the feature or its "fails safe to a new trace" behavior.💚 How did you test it?
Validated by the full Android e2e run on this PR (enabled via the
ready-to-mergelabel), which exerciseswebViewTraceConnectionon the API 30 release build.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
None.
🤖 Generated with Claude Code