lh0156 commented on code in PR #22943:
URL: https://github.com/apache/kafka/pull/22943#discussion_r3699762263
##########
clients/src/test/java/org/apache/kafka/common/network/SelectorTest.java:
##########
@@ -454,7 +454,7 @@ public void registerFailure() throws Exception {
public void testCloseOldestConnection() throws Exception {
String id = "0";
selector.connect(id, new InetSocketAddress("localhost", server.port),
BUFFER_SIZE, BUFFER_SIZE);
- NetworkTestUtils.waitForChannelConnected(selector, id);
+ NetworkTestUtils.waitForChannelReady(selector, id);
Review Comment:
Follow-up: the test now waits for TCP connectivity, processes the
connection, and only then waits for protocol readiness before advancing
MockTime. This removes the immediate-connect race; the expiry check runs after
the selector has processed any pending post-handshake state. The relevant TLS
selector tests pass. Please resolve this thread if this ordering addresses the
concern.
--
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]