Skip to content

Commit

Permalink
Using a consistent Duration.of everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
koushikr committed Jan 4, 2022
1 parent 88eb770 commit 4afb6ac
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ public static Service getService(String namespace, String serviceName){
refreshed and other boolean flags throughout the code.
*/
public static void sleepUntil(int numSeconds) {
await().pollDelay(numSeconds, TimeUnit.SECONDS).until(() -> true);
await().pollDelay(Duration.ofSeconds(numSeconds)).until(() -> true);
}

/*
Use this when you have to alter the numSeconds in any of the specific assertions. For finder and hub, the values are appropriately coded
keeping the start intervals in mind.
*/
public static void sleepUntil(int numSeconds, Callable<Boolean> conditionEvaluator) {
await().pollDelay(numSeconds, TimeUnit.SECONDS).until(conditionEvaluator);
await().pollDelay(Duration.ofSeconds(numSeconds)).until(conditionEvaluator);
}

/*
Expand Down

0 comments on commit 4afb6ac

Please sign in to comment.