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

Volkan Yazici vyazici at openjdk.org
Thu Feb 5 13:59:01 UTC 2026


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

>> OK - this is because the OS specific timeout kicks in. So you might get a `ConnectException` if the timeout you provide to connect() exceeds the OS/platform specific timeout. Otherwise you get the `SocketTimeoutException`. In my experiment (from which I excluded windows), I never got to trigger the `ConnectException`. I was using a timeout of `250 + Utils.adjustTimeout(250)`. It's OK to keep the `ConnectException` then. But I'm still wondering: does 5000 trigger the ConnectException?
>
> I'd expect the default OS specific connection timeout to be around 2 mins on unix platforms. So if you pass a timeout that's largely lesser than that you will practically never see the `ConnectException`. It may still happen if the selector/poller thread is paused for too long, so it's good to cater for that.

> OK - this is because the OS specific timeout kicks in. So you might get a `ConnectException` if the timeout you provide to connect() exceeds the OS/platform specific timeout. Otherwise you get the `SocketTimeoutException`.

Could you explain this a little bit more, please? Because, in the Windows host JTreg log I privately shared with you, there is the `elapsed time (seconds): 0.903` line. That is, `connect(..., 5000)` threw `ConnectionException` in less than 1s, which is less than both the timeout I provide (i.e., 5s) and the OS defaults to. Am I missing something?

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

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


More information about the net-dev mailing list