Add timeout to waitForBroadcastIdle in UserLifecycleTests.

Bug: 274491131
Test: atest UserLifecycleTests
Change-Id: I2eff4749f562e4e8e733cd991e70b8040c745906
This commit is contained in:
Yasin Kilicdere
2023-04-25 12:13:32 +01:00
parent 0ba8ced230
commit 3584f0cac4

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) {