Fix timeout in a test utility method
am: a210ccfab7
Change-Id: If4a9f7fdb70e674017a65805cc8738bd5665a873
This commit is contained in:
@@ -1055,6 +1055,9 @@ public class ShortcutManagerTestUtils {
|
||||
public static void retryUntil(BooleanSupplier checker, String message) {
|
||||
final long timeOut = System.currentTimeMillis() + 30 * 1000; // wait for 30 seconds.
|
||||
while (!checker.getAsBoolean()) {
|
||||
if (System.currentTimeMillis() > timeOut) {
|
||||
break;
|
||||
}
|
||||
try {
|
||||
Thread.sleep(200);
|
||||
} catch (InterruptedException ignore) {
|
||||
|
||||
Reference in New Issue
Block a user