nk1506 commented on code in PR #8715: URL: https://github.com/apache/iceberg/pull/8715#discussion_r1346198636
########## api/src/test/java/org/apache/iceberg/metrics/TestDefaultTimer.java: ########## @@ -104,7 +106,7 @@ public void measureRunnable() { Runnable runnable = () -> { try { - Thread.sleep(100); + Awaitility.await().atLeast(Duration.ofMillis(100)).until(() -> true); Review Comment: won't it become flaky, if callable condition is evaluated sooner. `if (evaluationDuration.compareTo(minWaitTime) < 0) { String message = String.format("Condition was evaluated in %s which is earlier than expected minimum timeout %s", formatAsString(evaluationDuration), formatAsString(minWaitTime)); conditionEvaluationHandler.handleTimeout(message, true); throw new ConditionTimeoutException(message); }` Why not use something like `https://github.com/apache/iceberg/blob/master/api/src/test/java/org/apache/iceberg/TestHelpers.java#L57` ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org