This is an automated email from the ASF dual-hosted git repository.

chia7712 pushed a commit to branch 2.6
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/2.6 by this push:
     new 1720467  KAFKA-10815 EosTestDriver#verifyAllTransactionFinished should 
break loop if all partitions are verified (#9706) (#9783)
1720467 is described below

commit 1720467b0924108ea1473816baceafc508a75fe7
Author: Chia-Ping Tsai <[email protected]>
AuthorDate: Thu Dec 24 00:13:07 2020 +0800

    KAFKA-10815 EosTestDriver#verifyAllTransactionFinished should break loop if 
all partitions are verified (#9706) (#9783)
    
    Reviewers: Matthias J. Sax <[email protected]>
---
 streams/src/test/java/org/apache/kafka/streams/tests/EosTestDriver.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/streams/src/test/java/org/apache/kafka/streams/tests/EosTestDriver.java 
b/streams/src/test/java/org/apache/kafka/streams/tests/EosTestDriver.java
index 45843aa..34b3bac 100644
--- a/streams/src/test/java/org/apache/kafka/streams/tests/EosTestDriver.java
+++ b/streams/src/test/java/org/apache/kafka/streams/tests/EosTestDriver.java
@@ -584,7 +584,7 @@ public class EosTestDriver extends SmokeTestUtil {
 
         final long maxWaitTime = System.currentTimeMillis() + MAX_IDLE_TIME_MS;
         try (final KafkaConsumer<byte[], byte[]> consumerUncommitted = new 
KafkaConsumer<>(consumerProps)) {
-            while (System.currentTimeMillis() < maxWaitTime) {
+            while (!partitions.isEmpty() && System.currentTimeMillis() < 
maxWaitTime) {
                 consumer.seekToEnd(partitions);
                 final Map<TopicPartition, Long> topicEndOffsets = 
consumerUncommitted.endOffsets(partitions);
 

Reply via email to