Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions espresso/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ The following artifacts were released:
* Replace now-unnecessary reflection from TestLooperManagerCompat when using Android SDK 36 APIs
* Don't suppress AppNotIdleException if dumpThreadStates throws.
* Remove Espresso.onIdle tracing
* Downgrade IdlingResourceRegistry potential race condition exception to warning.

**New Features**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,8 @@ private void handleRaceCondition(Message m) {
if (is.idle) {
// it was a race... i is now idle, everything is fine...
} else {
throw new IllegalStateException(
Log.w(
TAG,
String.format(
Locale.ROOT,
"Resource %s isIdleNow() is returning true, but a message indicating that the "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,8 @@ public interface ResourceCallback {
/**
* Called when the resource goes from busy to idle.
*
* <p>If the idle state is updated on a thread other than the main thread, this method should be
* called <b>before</b> the state is updated to return true. Failing to do so can cause a race
* condition where Espresso throws a consistency error due to observing {@link #isIdleNow()}
* returning true before the callback is invoked.
* <p>It is recommended to call this method <b>after</b> the idle state is updated to return
* true.
*/
public void onTransitionToIdle();
}
Expand Down
Loading