[RUM-14471] Fix flaky AppStartupActivityPredicateTest#3218
Merged
Conversation
…nContentActivity resume Apply the same CountDownLatch/ActivityLifecycleCallbacks pattern used in other startup tests to eliminate the race condition where MainContentActivity reaches RESUMED before the test begins asserting RUM events.
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3218 +/- ##
===========================================
- Coverage 71.46% 71.45% -0.01%
===========================================
Files 934 934
Lines 34628 34628
Branches 5862 5862
===========================================
- Hits 24745 24742 -3
- Misses 8238 8244 +6
+ Partials 1645 1642 -3 🚀 New features to boost your workflow:
|
hamorillo
marked this pull request as ready for review
March 4, 2026 14:56
aleksandr-gringauz
approved these changes
Mar 4, 2026
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.
What does this PR do?
Fixes a race condition in
AppStartupActivityPredicateTestintroduced in #3199. Applies the sameCountDownLatch+ActivityLifecycleCallbackspattern already used inAppStartupAutoForwardTestandAppStartupAsyncAutoForwardingTestto ensure the test waits forMainContentActivityto reachRESUMEDbefore asserting RUM events.Motivation
The test was flaky because
InterstitialSplashActivityimmediately starts and finishes synchronously, soMainContentActivitycould reachRESUMEDbeforerunInstrumentationScenariobegan checking — causing the 60sConditionWatcherto time out with the underlying assertion never satisfied.Additional Notes
No production code changes. Test-only fix following the existing pattern in the same package.
Review checklist (to be filled by reviewers)