TestDownloadManagerListener: Fix blockUntilIdle

PiperOrigin-RevId: 308985567
This commit is contained in:
olly 2020-04-29 10:20:59 +01:00 committed by Oliver Woodman
parent 922b8a2c15
commit a90f30a6cd

View File

@ -67,10 +67,10 @@ public final class TestDownloadManagerListener implements DownloadManager.Listen
() -> { () -> {
if (downloadManager.isIdle()) { if (downloadManager.isIdle()) {
idleCondition.open(); idleCondition.open();
checkedOnMainThread.open();
} }
checkedOnMainThread.open();
}); });
checkedOnMainThread.block(TIMEOUT_MS); assertThat(checkedOnMainThread.block(TIMEOUT_MS)).isTrue();
assertThat(idleCondition.block(TIMEOUT_MS)).isTrue(); assertThat(idleCondition.block(TIMEOUT_MS)).isTrue();
} }