RFR of JDK-8171076: improve rmi tests by replacing TestLibrary.createRegistryOnUnusedPort, getUnusedRandomPort

Hamlin Li huaming.li at oracle.com
Tue Dec 13 05:11:55 UTC 2016

Would you please review the below patch?

bug: https://bugs.openjdk.java.net/browse/JDK-8171076
webrev: http://cr.openjdk.java.net/~mli/8171076/webrev.00/

There are rmi tests using TestLibrary.createRegistryOnUnusedPort, 
getUnusedRandomPort, registry created by these 2 methods could cause 
"port in use" exception intermittently. For some of the tests, these 2 
methods can and should be replaced with createRegistryOnEphemeralPort 
and getRegistryPort.
Although not all the modified tests failed, it will help improve rmi 
test quality by replacing these methods.

Because of JDK-8170728, we can not relay the call of 
createRegistryOnUnusedPort to createRegistryOnEphemeralPort, because 
some test are calling createRegistryOnUnusedPort more than once.

Thank you

More information about the core-libs-dev mailing list