You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/11/01 06:40:22 UTC

[GitHub] [flink] guoweiM commented on a change in pull request #17532: [FLINK-22096][tests] Fix port conflict for ServerTransportErrorHandlingTest#testRemoteClose

guoweiM commented on a change in pull request #17532:
URL: https://github.com/apache/flink/pull/17532#discussion_r739986255



##########
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;

Review comment:
       Maybe we should give more details in the `Exception`. Such as the retry failed. 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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org