GJL commented on a change in pull request #7541: [FLINK-11356][tests] Port JobManagerStartupTest to new code base URL: https://github.com/apache/flink/pull/7541#discussion_r249714551
########## File path: flink-runtime/src/test/java/org/apache/flink/runtime/clusterframework/BootstrapToolsTest.java ########## @@ -360,4 +368,32 @@ public void testConcurrentActorSystemCreation() throws Exception { ExecutorUtils.gracefulShutdown(10000L, TimeUnit.MILLISECONDS, executorService); } } + + /** + * Tests that the {@link ActorSystem} fails with an expressive exception if it cannot be + * instantiated due to an occupied port. + */ + @Test + public void testActorSystemInstantiationFailureWhenPortOccupied() throws Exception { + ServerSocket portOccupier; + final int port; + + try { + port = NetUtils.getAvailablePort(); + portOccupier = new ServerSocket(port, 10, InetAddress.getByName("0.0.0.0")); + } + catch (Throwable t) { + // could not find free port, or open a connection there Review comment: It's acceptable to silently fail if we cannot open a socket? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services