diff --git a/ranger-core/src/test/java/com/flipkart/ranger/core/utils/RangerTestUtils.java b/ranger-core/src/test/java/com/flipkart/ranger/core/utils/RangerTestUtils.java index 3c30c006..53e3e122 100644 --- a/ranger-core/src/test/java/com/flipkart/ranger/core/utils/RangerTestUtils.java +++ b/ranger-core/src/test/java/com/flipkart/ranger/core/utils/RangerTestUtils.java @@ -57,7 +57,7 @@ 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); } /* @@ -65,7 +65,7 @@ public static void sleepUntil(int numSeconds) { keeping the start intervals in mind. */ public static void sleepUntil(int numSeconds, Callable conditionEvaluator) { - await().pollDelay(numSeconds, TimeUnit.SECONDS).until(conditionEvaluator); + await().pollDelay(Duration.ofSeconds(numSeconds)).until(conditionEvaluator); } /*