Commit 4ce4d0f
Fix deadlock in espresso in Robolectric INSTRUMENTATION_TEST + paused looper.
When running tests in Robolectric's INSTRUMENTATION_TEST LooperMode
and explicitly pausing the main looper, Espresso will deadlock if part of its
AsyncTask initialization occurs on the test thread.
Fix this by adding a call to explict call to ControlledLooper.drainMainThreadWhenIdle.
PiperOrigin-RevId: 7036344841 parent f5ff2c3 commit 4ce4d0f
File tree
2 files changed
+9
-0
lines changed- espresso
- core/java/androidx/test/espresso/base
2 files changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
45 | 51 | | |
46 | 52 | | |
47 | 53 | | |
| |||
85 | 91 | | |
86 | 92 | | |
87 | 93 | | |
| 94 | + | |
88 | 95 | | |
89 | 96 | | |
90 | 97 | | |
| |||
0 commit comments