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

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


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

commit 9aeacb425bfdd66a7588781c0838b485c2d80199
Author: Chia-Ping Tsai <[email protected]>
AuthorDate: Wed Dec 23 10:04:36 2020 +0800

    KAFKA-10815 EosTestDriver#verifyAllTransactionFinished should break loop if 
all partitions are verified (#9706)
    
    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 9f24720..18822d3 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
@@ -598,7 +598,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