kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rsiva...@apache.org
Subject [kafka] branch 2.2 updated: KAFKA-7288; Fix check in SelectorTest to wait for no buffered bytes (#6415)
Date Sat, 09 Mar 2019 08:15:42 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/2.2 by this push:
     new 38a7708  KAFKA-7288; Fix check in SelectorTest to wait for no buffered bytes (#6415)
38a7708 is described below

commit 38a7708a47361929df37ed0f03160bbac5e51e93
Author: Rajini Sivaram <rajinisivaram@googlemail.com>
AuthorDate: Sat Mar 9 08:09:56 2019 +0000

    KAFKA-7288; Fix check in SelectorTest to wait for no buffered bytes (#6415)
    
    Reviewers: Ismael Juma <ismael@juma.me.uk>
---
 clients/src/test/java/org/apache/kafka/common/network/SelectorTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clients/src/test/java/org/apache/kafka/common/network/SelectorTest.java b/clients/src/test/java/org/apache/kafka/common/network/SelectorTest.java
index 9d48ab5..7cb89c2 100644
--- a/clients/src/test/java/org/apache/kafka/common/network/SelectorTest.java
+++ b/clients/src/test/java/org/apache/kafka/common/network/SelectorTest.java
@@ -493,7 +493,7 @@ public class SelectorTest {
             do {
                 selector.poll(1000);
             } while (selector.completedReceives().isEmpty());
-        } while (selector.numStagedReceives(channel) == 0 && !channel.hasBytesBuffered()
&& --retries > 0);
+        } while ((selector.numStagedReceives(channel) == 0 || channel.hasBytesBuffered())
&& --retries > 0);
         assertTrue("No staged receives after 100 attempts", selector.numStagedReceives(channel)
> 0);
         // We want to return without any bytes buffered to ensure that channel will be closed
after idle time
         assertFalse("Channel has bytes buffered", channel.hasBytesBuffered());


Mime
View raw message