Merge "Test flaky test: Always wait for handle task to complete"

This commit is contained in:
TreeHugger Robot
2019-04-04 16:08:09 +00:00
committed by Android (Google) Code Review

View File

@@ -484,9 +484,6 @@ public class UserControllerTest {
private void waitForHandlerToComplete(Handler handler, long waitTimeMs)
throws InterruptedException {
if (!handler.hasMessagesOrCallbacks()) { // if nothing queued, do not wait.
return;
}
final Object lock = new Object();
synchronized (lock) {
handler.post(() -> {