JDK 9 RFR of JDK-8037360: java/nio/channels/SocketChannel/Connect.java fails intermittently
Hamlin Li
huaming.li at oracle.com
Fri Apr 8 02:26:49 UTC 2016
On 2016/4/8 0:16, Alan Bateman wrote:
>
>
> On 07/04/2016 06:25, Hamlin Li wrote:
>> Please review the patch for
>> java/nio/channels/SocketChannel/Connect.java fails intermittently.
>>
>> Root Cause: Original test try to build a refusing server by letting
>> system pick up a ephemeral port, then closing the ServerSocket, then
>> let client to connect this closed ServerSocket, but it's not that
>> stable, I think it's related to address/port reuse.
>> Suggested Fix: In this test, we only want a port that will refuse
>> connection always, so just let client connect to port 1 which will
>> refuse connection always.
>>
>> bug: https://bugs.openjdk.java.net/browse/JDK-8037360
>> webrev: http://cr.openjdk.java.net/~mli/8037360/webrev.00/
> I see port 1 is reserved for TCPMUX, I don't think I've ever seen that
> enabled so what you propose might be okay. We should at least put a
> comment in newRefusingServer as it may not be obvious to readers.
Hi Alan,
Thanks for reviewing.
Add detailed comment as you suggested, please help to review it again.
http://cr.openjdk.java.net/~mli/8037360/webrev.01/
Thank you
-Hamlin
>
> -Alan
More information about the nio-dev
mailing list