kirktrue commented on code in PR #20521:
URL: https://github.com/apache/kafka/pull/20521#discussion_r2442450440


##########
clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java:
##########
@@ -2686,12 +2686,11 @@ public void testCurrentLag(GroupProtocol groupProtocol) 
throws InterruptedExcept
         // poll once again, which should send the list-offset request
         consumer.seek(tp0, 50L);
         consumer.poll(Duration.ofMillis(0));
-        // requests: list-offset, fetch
-        TestUtils.waitForCondition(() -> {
-            boolean hasListOffsetRequest = requestGenerated(client, 
ApiKeys.LIST_OFFSETS);
-            boolean hasFetchRequest = requestGenerated(client, ApiKeys.FETCH);
-            return hasListOffsetRequest && hasFetchRequest;
-        }, "No list-offset & fetch request sent");

Review Comment:
   A change to the `KafkaConsumerTest.testCurrentLag()` test was required when 
we removed the time out for the 'update fetch positions' stage in 
`ApplicationEventProcessor`. We effectively now allow the 'update fetch 
positions' stage to complete fully before moving on to the 'fetch' stage. 
Because the test doesn't send a response for the `LIST_OFFSETS` until later, 
the 'update fetch positions' stage doesn't complete, and thus it doesn't move 
to the 'fetch' stage.
   
   In previous iterations of this PR, there was a mechanism (`PseudoEvent`) 
that would mimic the existing behavior to time out the 'update fetch positions' 
stage. We removed that because it was admittedly a bit clunky.



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

Reply via email to