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


##########
clients/src/test/java/org/apache/kafka/common/network/SelectorTest.java:
##########
@@ -1030,10 +1025,7 @@ private void blockingConnect(String node) throws 
IOException {
 
     protected void blockingConnect(String node, InetSocketAddress serverAddr) 
throws IOException {
         selector.connect(node, serverAddr, BUFFER_SIZE, BUFFER_SIZE);
-        while (!selector.connected().contains(node))
-            selector.poll(10000L);
-        while (!selector.isChannelReady(node))
-            selector.poll(10000L);
+        NetworkTestUtils.waitForChannelReady(selector, node);

Review Comment:
   @showuon I probably expressed that badly. I added 
`NetworkTestUtils.waitForChannelConnected()` for tests that don't need to use 
the channel and don't care about the current state, like 
`SelectorTest.testCloseOldestConnection()` (we can test idle connection 
expiration from every state).



-- 
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

Reply via email to