RFR: 8375352: java/net/httpclient/ConnectTimeoutWithProxy*.java tests fail on EC2 [v2]

Daniel Fuchs dfuchs at openjdk.org
Thu Feb 5 15:48:08 UTC 2026


On Thu, 5 Feb 2026 15:01:27 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:

>> On windows I see you do not get a timeout, but a "connection refused". Also in the log you shared you seem to be using `new Socket(host,port)` so the timeout is the default platform timeout - for which you always get the  `ConnectException`
>
> This `jshell` session output is from Windows:
> 
> 
> import module java.base
> var s0 = new ServerSocket(0, 1, InetAddress.getLoopbackAddress());
> var s1 = new Socket(s0.getInetAddress(), s0.getLocalPort());
> var s2 = new Socket();
> s2.connect(s0.getLocalSocketAddress(), 5000);
> 
> |  Exception java.net.ConnectException: Connection refused
> |        at Net.pollConnect (Native Method)
> |        at Net.pollConnectNow (Net.java:642)
> |        at NioSocketImpl.timedFinishConnect (NioSocketImpl.java:544)
> |        at NioSocketImpl.connect (NioSocketImpl.java:595)
> |        at SocksSocketImpl.connect (SocksSocketImpl.java:284)
> |        at Socket.connect (Socket.java:668)
> |        at (#5:1)

Yes - this is not a timeout.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/29431#discussion_r2769848254


More information about the net-dev mailing list