frankvicky commented on code in PR #16723:
URL: https://github.com/apache/kafka/pull/16723#discussion_r1703491837


##########
clients/src/test/java/org/apache/kafka/common/network/SelectorTest.java:
##########
@@ -831,13 +833,19 @@ public void 
testInboundConnectionsCountInConnectionCreationMetric() throws Excep
             for (int i = 0; i < conns; i++) {
                 Thread sender = createSender(serverAddress, randomPayload(1));
                 sender.start();
-                SocketChannel channel = ss.accept();
-                channel.configureBlocking(false);
-
-                selector.register(Integer.toString(i), channel);
+                threads.add(sender);
+                try (SocketChannel channel = ss.accept()) {

Review Comment:
   Thanks @chia7712 
   I think this suggestion is very insightful, I will follow it 😃 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to