nk1506 commented on code in PR #8715:
URL: https://github.com/apache/iceberg/pull/8715#discussion_r1346743526


##########
flink/v1.15/flink/src/test/java/org/apache/iceberg/flink/source/TestIcebergSourceContinuous.java:
##########
@@ -325,7 +328,7 @@ public void testSpecificSnapshotTimestamp() throws 
Exception {
     long snapshot0Timestamp = 
tableResource.table().currentSnapshot().timestampMillis();
 
     // sleep for 2 ms to make sure snapshot1 has a higher timestamp value
-    Thread.sleep(2);
+    Awaitility.await().atLeast(Duration.ofMillis(2)).until(() -> true);

Review Comment:
   If thread just requires to sleep for some duration , ideally it should be 
like 
   `Awaitility.await().pollDelay(2, TimeUnit.MILLISECONDS).until(() -> 
System.currentTimeMillis()-snapshot0Timestamp>2);`



##########
flink/v1.15/flink/src/test/java/org/apache/iceberg/flink/source/TestIcebergSourceContinuous.java:
##########
@@ -403,7 +406,7 @@ public static List<Row> 
waitForResult(CloseableIterator<Row> iter, int limit) {
 
   public static void waitUntilJobIsRunning(ClusterClient<?> client) throws 
Exception {

Review Comment:
   remove this method and instead of this it should be something like
   `Awaitility.await().pollDelay(10, TimeUnit.MILLISECONDS).until(() -> 
!getRunningJobs(MINI_CLUSTER_RESOURCE.getClusterClient()).isEmpty());`
   
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to