Merge "Add timeout to waitForBroadcastIdle in UserLifecycleTests." into udc-dev

This commit is contained in:
Yasin Kilicdere
2023-04-25 17:23:25 +00:00
committed by Android (Google) Code Review

View File

@@ -1538,7 +1538,11 @@ public class UserLifecycleTests {
}
private void waitForBroadcastIdle() {
ShellHelper.runShellCommand("am wait-for-broadcast-idle");
try {
runShellCommandWithTimeout("am wait-for-broadcast-idle", TIMEOUT_IN_SECOND);
} catch (TimeoutException e) {
Log.e(TAG, "Ending waitForBroadcastIdle because it is taking too long", e);
}
}
private void sleep(long ms) {