Fixed
Status Update
Comments
sl...@google.com <sl...@google.com>
nk...@google.com <nk...@google.com> #2
this would be nice but given Compose and all other priorities, we are not planning to make any big investments in data binding (support KSP is a very big task).
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.