public static boolean checkAndSleep(Supplier<Boolean> conditionToCheck, int timeoutInMs) {
    return checkAndSleep(true, conditionToCheck, timeoutInMs);
  }
Periodically check boolean condition until timeout.
@param conditionToCheck the condition to check.
@param timeoutInMs the time out in millisecond.
@return true if condition is true before timeout.
ambry-test-utils/src/main/java/com/github/ambry/utils/TestUtils.java