-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only drain main looper when it is paused.
ControlledLooper.drainMainThreadUntilIdle was created so Robolectric can manually execute tasks when main looper is paused. Now with the introduction of INSTRUMENTATION_TEST looper mode with a free running looper, it doesn't make sense to always idle the main looper, and could lead to deviation of behavior between a test run with Robolectric INSTRUMENTATION_TEST mode and real android. This commit changes drainMainThreadUntilIdle so its a no-op if main looper is not paused. PiperOrigin-RevId: 703634485
- Loading branch information
1 parent
f5ff2c3
commit 654fcd5
Showing
2 changed files
with
9 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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