You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/05/25 11:48:18 UTC

[GitHub] [kafka] fvaleri commented on a diff in pull request #12159: KAFKA-13933: Fix stuck SSL tests in case of authentication failure

fvaleri commented on code in PR #12159:
URL: https://github.com/apache/kafka/pull/12159#discussion_r881556147


##########
clients/src/test/java/org/apache/kafka/common/network/NetworkTestUtils.java:
##########
@@ -87,13 +88,23 @@ public static void checkClientConnection(Selector selector, String node, int min
         }
     }
 
+    public static void waitForChannelConnected(Selector selector, String node) throws IOException {
+        int secondsLeft = 30;
+        while (selector.channel(node) != null
+                && !selector.channel(node).isConnected() && secondsLeft-- > 0) {
+            selector.poll(1000L);
+        }
+        assertNotNull(selector.channel(node));
+        assertTrue(selector.channel(node).isConnected(), String.format("Channel %s is not connected after %d seconds", node, secondsLeft));

Review Comment:
   Right, thanks for spotting this.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org