manuzhang commented on PR #12707: URL: https://github.com/apache/iceberg/pull/12707#issuecomment-2774457965
The flaky test is usually when we need to wait for a condition to come true. In this case, ``` AtomicInteger barrier = new AtomicInteger(0); Tasks.range(threadsCount) .stopOnFailure() .throwFailureWhenFinished() .executeWith(executorService) .run( index -> { for (int numCommittedFiles = 0; numCommittedFiles < numberOfCommitedFilesPerThread; numCommittedFiles++) { final int currentFilesCount = numCommittedFiles; Awaitility.await() .pollInterval(Duration.ofMillis(10)) .atMost(Duration.ofSeconds(10)) .until(() -> barrier.get() >= currentFilesCount * threadsCount); tableWithHighRetries.newFastAppend().appendFile(file).commit(); barrier.incrementAndGet(); } }); ``` -- 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