RFR: 8328619: sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.java failed with BindException: Address already in use
    Chris Plummer 
    cjplummer at openjdk.org
       
    Mon Mar 25 19:07:47 UTC 2024
    
    
  
On Mon, 25 Mar 2024 13:15:48 GMT, Kevin Walls <kevinw at openjdk.org> wrote:
> Test uses  jdk.test.lib.Utils.getFreePort() when launching a new Java command.
> Looks like it already recognises "java.rmi.server.ExportException: Port already in use: " and retries, but there is a long-standing typo in the check.
> 
> e.g. 
> 
> test output:
> Error: Exception thrown by the agent: java.rmi.server.ExportException: Port already in use: 37049; nested exception is: 
> 	java.net.BindException: Address already in use
> 	
> Test checks for:
>         !output.getOutput().contains("Exception thrown by the agent : java.rmi.server.ExportException: Port already in use")
> 		
> Oops, we have an extra space in there.  A day-one typo from JDK-7195249.
> 
> While here, try to clarify the while loop which recognises this port failure.  Also add something to clarify which test(s) failed, and correct a comment in test2 of AbstractFilePermissionTest.java
test/jdk/sun/management/jmxremote/bootstrap/AbstractFilePermissionTest.java line 144:
> 142: 
> 143:         if (doTest() != 0) {
> 144:             System.out.println("FAILURE");
Would be better to print out which test failed and include the error #.
test/jdk/sun/management/jmxremote/bootstrap/AbstractFilePermissionTest.java line 159:
> 157: 
> 158:         if (doTest() == 0) {
> 159:             System.out.println("FAILURE");
Would be better to print out which test failed and include the error #.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18470#discussion_r1538097934
PR Review Comment: https://git.openjdk.org/jdk/pull/18470#discussion_r1538098137
    
    
More information about the serviceability-dev
mailing list