TanYuxin-tyx commented on a change in pull request #17532:
URL: https://github.com/apache/flink/pull/17532#discussion_r740326336



##########
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:
       Thanks. I will make the exception inevitable by init the server using an 
occupied port. And I will print the detailed stack of the exception by 
triggering it in the CI test.




-- 
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]


Reply via email to