Skip to content

test(e2e): De-flake TurboModule span-attribute count assertion - #6596

Merged
antonis merged 3 commits into
mainfrom
test/turbomodule-e2e-count-race
Aug 20, 2026
Merged

test(e2e): De-flake TurboModule span-attribute count assertion#6596
antonis merged 3 commits into
mainfrom
test/turbomodule-e2e-count-race

Conversation

@antonis

@antonis antonis commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

The Test android production REV2 job (Sample Application workflow) has been failing on every main run since the TurboModule e2e was introduced in #6549 (Aug 5). It fails on this Maestro assertion:

[Failed] turboModuleSpanAttributes.test (Assertion is false: "turbo_module.total_call_count: 6" is visible)

💡 Motivation and Context

Failed checks

💚 How did you test it?

CI

📝 Checklist

  • I added tests to verify changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.
  • No breaking changes.

🔮 Next steps

@github-actions

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • test(e2e): De-flake TurboModule span-attribute count assertion by antonis in #6596
  • chore(e2e): Bump Android binary size diff limit to 5.8 MiB by antonis in #6595
  • docs: update CONTRIBUTING paths for the monorepo layout by melbinjp in #6594

🤖 This preview updates automatically when you update the PR.

@antonis
antonis force-pushed the test/turbomodule-e2e-count-race branch from f3e5888 to 47d94f3 Compare August 19, 2026 11:12
@antonis antonis added the ready-to-merge Triggers the full CI test suite label Aug 19, 2026
@sentry

sentry Bot commented Aug 19, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
Sentry RN io.sentry.reactnative.sample 8.23.0 (103) Release

⚙️ sentry-react-native Build Distribution Settings

@antonis
antonis force-pushed the test/turbomodule-e2e-count-race branch from 47d94f3 to f42d2f3 Compare August 19, 2026 12:12
The `turbo_module.*` attribute block is the last content in a long
ScrollView, so on the shorter Android emulator screen it renders below the
fold. `assertVisible` only inspects the current viewport, so the
`turbo_module.total_call_count: 6` assertion has failed on every Android
REV2 run since #6549 introduced the test, while iOS (taller screen, block
in view) has been green — proving the SDK and on-device render are correct.

- Scroll the attribute block into view before asserting, and match the full
  line with a regex (Maestro anchors `assertVisible` text to the whole node,
  so a bare `total_call_count:` prefix would not match `... : 6`).
- Run the native-throw interaction before that scroll: the throw button is
  at the top of the screen and must be tapped while the viewport is still
  there, otherwise scrolling to the attributes pushes it off-screen on
  Android.

The exact on-screen count is intentionally not pinned — it can race the
async `getPlatform` record settling against the synchronous post-`end()`
read; the authoritative counts are asserted against the transaction
envelope in turboModuleSpanAttributes.test.ts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@antonis
antonis force-pushed the test/turbomodule-e2e-count-race branch from f42d2f3 to 619f74d Compare August 19, 2026 12:40
@antonis
antonis marked this pull request as ready for review August 19, 2026 13:58

@lucas-zimerman lucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@antonis
antonis merged commit 7eeebd1 into main Aug 20, 2026
88 checks passed
@antonis
antonis deleted the test/turbomodule-e2e-count-race branch August 20, 2026 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Triggers the full CI test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants