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

rsivaram 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 da5f353  KAFKA-7288; Fix check in SelectorTest to wait for no buffered 
bytes (#6415)
da5f353 is described below

commit da5f353401baaae3da9bc23690c1c9cbb28ecd56
Author: Rajini Sivaram <rajinisiva...@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 <ism...@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());

Reply via email to