AndrewJSchofield commented on code in PR #14912:
URL: https://github.com/apache/kafka/pull/14912#discussion_r1417011418


##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumerTest.java:
##########
@@ -966,22 +967,25 @@ private void 
testUpdateFetchPositionsWithFetchCommittedOffsetsTimeout(boolean co
 
         consumer.assign(singleton(new TopicPartition("t1", 1)));
 
-        try (MockedConstruction<OffsetFetchApplicationEvent> ignored = 
offsetFetchEventMocker(committedFuture)) {
-            // Poll with 0 timeout to run a single iteration of the poll loop
-            consumer.poll(Duration.ofMillis(0));
+        try (MockedConstruction<FetchCommittedOffsetsApplicationEvent> ignored 
= offsetFetchEventMocker(committedFuture)) {
+            // Poll with 250ms timeout to run at least a single iteration of 
the poll loop

Review Comment:
   Yes, it's to let the internal requests on the background thread have time to 
complete so they do not time out. I'll fix this.



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

Reply via email to