k-wall commented on PR #13572: URL: https://github.com/apache/kafka/pull/13572#issuecomment-1512921634
> @divijvaidya , thanks for the comment. I agree with you most of them. But for this point: > > > I would suggest to extract out a method "createSocketServerChannel()" in SocketServer.java. This method would create the channel and set the configuration on the socket. Use this same method in all the tests. > > Since the `SelectorTest` and other network tests are in client module, we should not add `core` dependency to `client` module. So, I think adding a util method in `TestUtils` should be good enough. WDYT? `NioEchoServer`, `SelectorTest `and `SslSelectorTests` already make sensible use of `bind(0)`, so the listening sockets they create cannot actually suffer the problem described in the JIRA, even if those tests were run in tight loop. The network stack would chose an ephemeral port that was not in timed wait. I think there is an argument for leaving these tests untouched. I'm +1 to adding a new core test to ensure that the listener sockets made by Acceptors do have SO_REUSEADDR set correctly and of course the comment to explain why it is so. -- 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
