JDK 9 RFR of JDK-8037360: java/nio/channels/SocketChannel/Connect.java fails intermittently

Alan Bateman Alan.Bateman at oracle.com
Thu Apr 7 16:16:40 UTC 2016



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.

-Alan


More information about the nio-dev mailing list