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

Commit 591b983e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "More test utilities for CTS"

parents 7a54282c d67bf6a9
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;