zentol commented on PR #22471:
URL: https://github.com/apache/flink/pull/22471#issuecomment-1519921672
> maybe another fixing method is that use the bind to trigger to choose an
available port
I don't think this'd make the test stable.
The test requires a port against which it can send a request, and we _know_
it won't get a response.
For that we need to fully control that port, because otherwise some stray
process may happen to bind to that port and answer the request.
What if we'd create UDP socket on a random port and use that instead?
```
DatagramSocket s = new DatagramSocket();
InetSocketAddress serverAddress =
new InetSocketAddress(InetAddress.getLocalHost(),
s.getLocalPort());
```
--
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]