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

Volkan Yazici vyazici at openjdk.org
Thu Feb 5 15:10:40 UTC 2026


On Thu, 5 Feb 2026 14:22:04 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> I was speaking about unix platforms behaviour here. The test excludes windows platforms.
>
> 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)

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

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


More information about the net-dev mailing list