fknives / Android-Tutorial-Test-ShowCase

Mock project showcasing testing on Android. It is used as a CodeKata.
Apache License 2.0
7 stars 2 forks source link

Compose IdlingResources handling crash #125

Closed fknives closed 2 years ago

fknives commented 2 years ago

Describe the bug Flakiness of Compose tests are not fully fixed (original issue: https://github.com/fknives/AndroidTest-ShowCase/issues/97)

Expected behavior The Compose tests should not be flaky.

Additional context The loopMainThreadFor inside awaitIdlingResources in AuthComposeInstrumentedTest has crashed with:

java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Resource Compose-Espresso link isIdleNow() is returning true, but a message indicating that the resource has transitioned from busy to idle was never sent.

Meaning the Okhttp Idling resource didn't call callback, but stated that it became Idle. So that needs to be fixed.

Additional logs:

Emulator30-logs.zip