Fixed
Status Update
Comments
nk...@google.com <nk...@google.com>
nk...@google.com <nk...@google.com> #2
Thanks for filing the issue.
This is a particularly hard device to come by - do you happen to have access to the device? If so could you provide us with the output of: adb shell dumpsys media.camera > info.txt
Thanks!
This is a particularly hard device to come by - do you happen to have access to the device? If so could you provide us with the output of: adb shell dumpsys media.camera > info.txt
Thanks!
Description
Version used: 3.0.1
What steps will reproduce the problem?
1. register CountingIdlingResource in IdlingRegistry.getInstance().register()
2. launch Activity in test which performs some async operation (in worker thread which is monitored by CountingIdlingResource registered in previous step )
3. dont't use any of Espresso.onView, onData, registerIdlingResources
4. use Espresso.onIdle to check something not related with UI which should happen after async operation
How are you running your tests (via Android Studio, Gradle, adb, etc.)?
Android Studio
What is the expected output? What do you see instead?
Expected: test passed
Actual: test fail because onIdle does not wait for CountingIdlingResource
Reason:
Espresso registers IdlingResource's from IdlingRegistry to IdlingResourceRegistry by nvoking IdlingResourceRegistry.sync method. It does not invoke it in onIdle.
Everything works as expected if before onIdle there is Espresso.onView call.