Fixed
Status Update
Comments
sl...@google.com <sl...@google.com>
nk...@google.com <nk...@google.com> #2
I have also seen this issue, careful analysis has shown it appears to be related to the canary version of the caf_receiver framework.
In debug mode you will see: Load failed: cast.o.media.Il.create is not a function
This function appears to be missing inhttps://www.gstatic.com/cast/sdk/libs/caf_receiver/canary/cast_receiver_framework.js , the code in the non-canary framework, located at https://www.gstatic.com/cast/sdk/libs/caf_receiver/v3/cast_receiver_framework.js doesn't have this issue.
In debug mode you will see: Load failed: cast.o.media.Il.create is not a function
This function appears to be missing in
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.