Skip to content

test(android): Collect UI test breadcrumbs in a thread-safe list - #6681

Merged
runningcode merged 1 commit into
mainfrom
no/uitest-thread-safe-breadcrumbs
Nov 19, 2026
Merged

runningcode merged 1 commit into
mainfrom
no/uitest-thread-safe-breadcrumbs

Conversation

@runningcode

Copy link
Copy Markdown
Contributor

📜 Description

The Compose click and swipe UI tests collect breadcrumbs from beforeBreadcrumb into a plain ArrayList. That callback runs on whichever thread adds the breadcrumb, so two threads could append at once and leave a null slot, failing the test with an NPE. The list is now a CopyOnWriteArrayList.

💡 Motivation and Context

composableSwipeGeneratesMatchingBreadcrumb failed once this way in the AGP 9.5.1 matrix on a 9.x.x PR. It replaces #6671, so the fix reaches 9.x.x through the main sync.

#skip-changelog

💚 How did you test it?

CI. Test-only change.

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the 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.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🤖 Generated with Claude Code

beforeBreadcrumb runs on whichever thread adds the breadcrumb, so the
Compose click and swipe tests could append to a plain ArrayList from two
threads at once and fail with an NPE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR risk: low

For commit b2e97a2.

This label is a hint for reviewers, not an approval.

@sentry

sentry Bot commented Nov 19, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.65.0 (1) release

⚙️ sentry-android Build Distribution Settings

@runningcode
runningcode marked this pull request as ready for review November 19, 2026 13:26
@runningcode
runningcode requested review from a team and adinauer as code owners November 19, 2026 13:26
@runningcode
runningcode requested review from markushi and romtsn and removed request for a team November 19, 2026 13:26
@github-actions github-actions Bot added risk: low PR risk score: low and removed risk: low PR risk score: low labels Nov 19, 2026
@runningcode
runningcode merged commit e76c4e5 into main Nov 19, 2026
38 checks passed
@runningcode
runningcode deleted the no/uitest-thread-safe-breadcrumbs branch November 19, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants