lh0156 commented on code in PR #22943:
URL: https://github.com/apache/kafka/pull/22943#discussion_r3703818525
##########
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:
Good catch. `NetworkTestUtils.waitForChannelReady` can return while the TLS
1.3 transport is still in its `POST_HANDSHAKE` state because `ready()`
intentionally includes that state.
I updated the test in commit `21ba6613b5` to complete an empty application
request/response before advancing the mock clock. This processes any pending
post-handshake messages before the idle window begins, so the expiry assertion
is based on the last actual network activity.
Verification:
- `SelectorTest.testCloseOldestConnection`
- `Tls13SelectorTest.testCloseOldestConnection`
- `clients:spotlessCheck`
- `clients:checkstyleMain`
- `clients:checkstyleTest`
- `clients:spotbugsMain`
All passed.
--
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]