guoweiM commented on a change in pull request #17532:
URL: https://github.com/apache/flink/pull/17532#discussion_r739989338
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/netty/ServerTransportErrorHandlingTest.java
##########
@@ -101,7 +104,22 @@ public void channelRead(ChannelHandlerContext ctx, Object
msg)
NettyTestUtil.NettyServerAndClient serverAndClient = null;
try {
- serverAndClient = initServerAndClient(protocol, createConfig());
+ for (int retry = 0; retry < NETTY_INIT_MAX_RETRY_TIMES; retry++) {
+ try {
+ serverAndClient = initServerAndClient(protocol,
createConfig());
+ break;
+ } catch (Exception e) {
+ if (retry >= NETTY_INIT_MAX_RETRY_TIMES - 1) {
+ throw e;
+ }
+ if (e instanceof BindException
Review comment:
I am not sure but from the test url I find the `Exception` is following

So I would suggest to see what exactly exception is when the port is used.
WDYT?
--
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]