zentol commented on a change in pull request #18334:
URL: https://github.com/apache/flink/pull/18334#discussion_r782903751



##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/netty/NettyConnectionManagerTest.java
##########
@@ -46,17 +47,21 @@
     public void testMatchingNumberOfArenasAndThreadsAsDefault() throws 
Exception {
         // Expected number of arenas and threads
         int numberOfSlots = 2;
-
-        NettyConfig config =
-                new NettyConfig(
-                        InetAddress.getLocalHost(),
-                        NetUtils.getAvailablePort(),
-                        1024,
-                        numberOfSlots,
-                        new Configuration());
-
-        NettyConnectionManager connectionManager = 
createNettyConnectionManager(config);
-        connectionManager.start();
+        NettyConnectionManager connectionManager;
+        try (NetUtils.Port port = NetUtils.getAvailablePort()) {
+            NettyConfig config =
+                    new NettyConfig(
+                            InetAddress.getLocalHost(),
+                            port.getPort(),

Review comment:
       This test still passes if port 0 is used




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