RFR : JDK-8204661 - Show error 'Port already in use' in HashedPasswordFileTest.java
mandy chung
mandy.chung at oracle.com
Thu Jun 21 05:00:13 UTC 2018
On 6/20/18 1:14 AM, Harsha Wardhana B wrote:
> Hi,
>
> Please find the fix below for the bug
>
> JDK-8204661 : Show error 'Port already in use' in
> HashedPasswordFileTest.java
>
> having webrev at,
>
> http://cr.openjdk.java.net/~hb/8204661/webrev.00/
>
> The problem root-cause is discussed in the comments section of the bug.
>
> The fix above lets the default agent pick a free port by passing
> 'port=0' value and then reads the JMX Connector URL from Perf Counters.
This looks fine. Please add this issue number to @bug.
This is interesting. I was not aware of setting port=0 will auto-assign
a free port. Do you know if it was added for testing purpose (which I
assume so)?
For example
test/jdk/sun/management/jmxremote/bootstrap/RmiBootstrapTest.java uses
jdk.testlibrary.Utils.getFreePort() to get a free port number.
Mandy
More information about the serviceability-dev
mailing list