Skip to content

test(android): Stop memory limiter tests waiting on flush timeouts - #6211

Merged
runningcode merged 1 commit into
mainfrom
no/cross-integration-test-flush-timeout
Oct 1, 2026
Merged

runningcode merged 1 commit into
mainfrom
no/cross-integration-test-flush-timeout

Conversation

@runningcode

@runningcode runningcode commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

📜 Description

Set flushTimeoutMillis and sessionFlushTimeoutMillis to 0 in the MemoryLimiterIntegrationTest and ApplicationExitInfoCrossIntegrationTest fixtures, like ApplicationExitIntegrationTestBase already does.

💡 Motivation and Context

Estimated savings: about 8 minutes per :sentry-android-core:testReleaseUnitTest run. The task runs in a single fork, so this is wall-clock time.

Class Before After
MemoryLimiterIntegrationTest 363s 0.2s
ApplicationExitInfoCrossIntegrationTest 122s 1.3s

Resolves: https://linear.app/getsentry/issue/JAVA-760/investigate-why-cpu-is-idle-for-3-minutes-while-executing-the-sentry

📝 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.

#skip-changelog

🤖 Generated with Claude Code

MemoryLimiterIntegrationTest and ApplicationExitInfoCrossIntegrationTest kept
the default 15s flush and session flush timeouts. Nothing in these tests
releases those latches, so every integration registration and every captured
event blocked for the full timeout. The two classes took about 8 minutes
combined and now take under 2 seconds.

Also drop the manual cache dir cleanup in these two tests and in
AnrV2IntegrationTest. The TemporaryFolder rule already deletes it after each
test.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@runningcode runningcode added the sanity-check PR needs a lightweight review for obvious issues label Oct 1, 2026
@runningcode
runningcode marked this pull request as ready for review October 1, 2026 13:58
@sentry

sentry Bot commented Oct 1, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

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

⚙️ sentry-android Build Distribution Settings

@linear-code

linear-code Bot commented Oct 1, 2026

Copy link
Copy Markdown

JAVA-760

@runningcode
runningcode enabled auto-merge (squash) October 1, 2026 14:22

@0xadam-brown 0xadam-brown left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

⚡

@runningcode
runningcode merged commit 04f0226 into main Oct 1, 2026
44 of 45 checks passed
@runningcode
runningcode deleted the no/cross-integration-test-flush-timeout branch October 1, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sanity-check PR needs a lightweight review for obvious issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants