You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by rs...@apache.org on 2018/08/15 08:05:44 UTC
[kafka] branch trunk updated: KAFKA-7288: Fix for
SslSelectorTest.testCloseConnectionInClosingState (#5504)
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 e4de328 KAFKA-7288: Fix for SslSelectorTest.testCloseConnectionInClosingState (#5504)
e4de328 is described below
commit e4de328daba2d337929b26dad8e3993b97e9715b
Author: Rajini Sivaram <ra...@googlemail.com>
AuthorDate: Wed Aug 15 09:05:30 2018 +0100
KAFKA-7288: Fix for SslSelectorTest.testCloseConnectionInClosingState (#5504)
Ensure that sends are completed before waiting for channel to be closed based on idle expiry, since channel will not be expired if added to ready keys in the next poll as a result of pending sends.
Reviewers: Jun Rao <ju...@gmail.com>
---
.../src/test/java/org/apache/kafka/common/network/SelectorTest.java | 4 +++-
1 file changed, 3 insertions(+), 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 3bb6244..cfd7fb3 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
@@ -418,7 +418,9 @@ public class SelectorTest {
selector.mute(id);
for (int i = 0; i <= maxStagedReceives; i++) {
selector.send(createSend(id, String.valueOf(i)));
- selector.poll(1000);
+ do {
+ selector.poll(1000);
+ } while (selector.completedSends().isEmpty());
}
selector.unmute(id);