RFR of JDK-8199215: Re-examine getFreePort method in test infrastructure library
Alan Bateman
Alan.Bateman at oracle.com
Thu Mar 15 11:20:06 UTC 2018
On 15/03/2018 08:43, Hamlin Li wrote:
> :
>
> Hi Alan,
>
> Thank you for reviewing, I have updated the webrev in place.
( cc'ing serviceability-dev and net-dev as these are the other areas
that use the getFreePort method in the test library. For context, the
patch that we are discussing is:
http://cr.openjdk.java.net/~mli/8199215/webrev.00/ )
The new implementation of getFreePort looks good but it no longer throws
InterruptedException and so might need some of the usages (esp. in the
serviceability tests) to be updated. Also the comment "The function will
spin ..." is no longer relevant and can be removed.
Moving refusingEndpoint() from the NIO test to Utils looks okay. The
"it's much more stable ..." in the method description looks a it
inconsistent with the other wording. An alternative is "This method is
better choice than getFreePort for tests that need an endpoint that
refuses connections".
The update to the tests look okay to me.
-Alan
More information about the serviceability-dev
mailing list