[BUG]: TestCoroutineDispatchers time out sometimes in large Espresso Tests #5379
Labels
bug
End user-perceivable behaviors which are not desirable.
Impact: Medium
Moderate perceived user impact (non-blocking bugs and general improvements).
Work: Medium
The means to find the solution is clear, but it isn't at good-first-issue level yet.
Describe the bug
StateFragmentTest
andExplorationActivityTest
, do not run in espresso, with the failure:Steps To Reproduce
StateFragmentTest
orExplorationActivityTest
in Espresso(Aside from the defaultverifyScreenNameInIntent
test)Expected Behavior
Test builds, runs and passes.
Screenshots/Videos
There are a variety of errors, but the most important one is:
java.lang.RuntimeException: java.util.concurrent.ExecutionException: androidx.test.espresso.IdlingResourceTimeoutException: Wait for [TestCoroutineDispatcherIdlingResource] to become idle timed out
Another common failure:
Test instrumentation process crashed. Check org.oppia.android.app.player.exploration.ExplorationActivityTest#testExplorationActivity_hasCorrectActivityLabel.txt for details
The details, which you can. read from Logcat, are as follows:
What device/emulator are you using?
Nexus 9 emulator Pixel 3A emulator
Which Android version is your device/emulator running?
Api 29,
Which version of the Oppia Android app are you using?
Developer build
Additional Context
I read this discussion on the cause of the timeout: https://stackoverflow.com/questions/53197993/why-is-androidx-espresso-check-causing-androidx-test-espresso-idlingresourcet
@Akshatkamboj14 reported this in a discussion in the CLaM groupchat: https://docs.google.com/document/d/1bDlGkkuhDXUv04KWve4OXC11srj7jTFWdIpiCgA93NI/edit#heading=h.jl2gn54iqprw, and @BenHenning suggested:
@BenHenning in a seperate thread explained:
I use an M1 Mac, and @ShubhadeepKarmakar and @theMr17 who have reported the same issue both use Windows PC.
The text was updated successfully, but these errors were encountered: