Fixed
Status Update
Comments
sl...@google.com <sl...@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. Declare 2 identical tests
2. register CountingIdlingResource in junit Before and unregister it in junit After
3. perform some async operation and manage idling resource before and after it
4. second test most of the time fails but only if first is run before it.
How are you running your tests (via Android Studio, Gradle, adb, etc.)?
Android Studio, Device: Nexus 5x Os ver. 7.1.2, all animations settings set to 0.5x
What is the expected output? What do you see instead?
Expected: all tests pass
Actual: Second test fails very often
Sample project attached.
Reason:
Espresso is static and keeps outdated idling resources in IdlingResourceRegistry.
It sync its state with IdlingRegistry on first onView() operation in second test which for unknown reason (probably) unregister correct idling resource.