nastra commented on code in PR #8804:
URL: https://github.com/apache/iceberg/pull/8804#discussion_r1365080751


##########
core/src/test/java/org/apache/iceberg/jdbc/TestJdbcTableConcurrency.java:
##########
@@ -92,14 +94,11 @@ public synchronized void testConcurrentFastAppends() throws 
IOException {
         .run(
             index -> {
               for (int numCommittedFiles = 0; numCommittedFiles < 10; 
numCommittedFiles++) {
-                while (barrier.get() < numCommittedFiles * 2) {
-                  try {
-                    Thread.sleep(10);
-                  } catch (InterruptedException e) {
-                    throw new RuntimeException(e);
-                  }
-                }
-
+                final int currentFilesCount = numCommittedFiles;
+                Awaitility.await()
+                    .pollInterval(Duration.ofMillis(10))
+                    .atMost(Duration.ofMillis(1000))
+                    .until(() -> !(barrier.get() < currentFilesCount * 2));

Review Comment:
   same for the other places



-- 
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