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-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org