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