Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d67bf6a9 authored by Makoto Onuki's avatar Makoto Onuki
Browse files

More test utilities for CTS

Bug 29612099

Change-Id: I9252e6c26e323dc6d55de46c9437460947d3c118
parent c8c44e73
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1055,7 +1055,11 @@ public class ShortcutManagerTestUtils {
    }

    public static void retryUntil(BooleanSupplier checker, String message) {
        final long timeOut = System.currentTimeMillis() + 30 * 1000; // wait for 30 seconds.
        retryUntil(checker, message, 30);
    }

    public static void retryUntil(BooleanSupplier checker, String message, long timeoutSeconds) {
        final long timeOut = System.currentTimeMillis() + timeoutSeconds * 1000;
        while (!checker.getAsBoolean()) {
            if (System.currentTimeMillis() > timeOut) {
                break;