mjsax commented on a change in pull request #9688:
URL: https://github.com/apache/kafka/pull/9688#discussion_r535954201



##########
File path: 
streams/src/test/java/org/apache/kafka/streams/integration/utils/IntegrationTestUtils.java
##########
@@ -1161,7 +1161,7 @@ public static void verifyKeyValueTimestamps(final 
Properties consumerConfig,
     }
 
     private static boolean continueConsuming(final int messagesConsumed, final 
int maxMessages) {
-        return maxMessages <= 0 || messagesConsumed < maxMessages;
+        return maxMessages > 0 && messagesConsumed < maxMessages;

Review comment:
       We have cases when we pass in `0` and for this case, the old code did 
loop forever until the timeout hits and the test fails. Seems this logic was 
wrong from the beginning on an we should stop fetching if `maxMessages <= 0` 
instead of looping forever.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to