showuon commented on code in PR #17214: URL: https://github.com/apache/kafka/pull/17214#discussion_r1762465096
########## core/src/test/java/kafka/log/remote/RemoteLogOffsetReaderTest.java: ########## @@ -111,8 +111,11 @@ public void testTaskQueueFullAndCancelTask() throws Exception { holderList.get(2).jobFuture().cancel(false); rlm.resume(); - AsyncOffsetReadFutureHolder<Either<Exception, Option<TimestampAndOffset>>> last = holderList.get(holderList.size() - 1); - last.taskFuture().get(100, TimeUnit.MILLISECONDS); + for (AsyncOffsetReadFutureHolder<Either<Exception, Option<TimestampAndOffset>>> holder : holderList) { + if (!holder.jobFuture().isCancelled()) { + holder.taskFuture().get(1, TimeUnit.SECONDS); + } + } Review Comment: OK, we now want to explicitly wait for all tasks completed because on CI, the machine is quite slow. Besides, I think we can also reduce the queue size to a smaller number, ex: 3, to use less resource to make the test more reliable. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org