RFR: 8375352: java/net/httpclient/ConnectTimeoutWithProxy*.java tests fail on EC2
Daniel Fuchs
dfuchs at openjdk.org
Tue Jan 27 10:12:45 UTC 2026
On Tue, 27 Jan 2026 09:55:11 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> Fix tests using `AbstractConnectTimeout` by replacing the usage of an external host (i.e., `example.com`), which unexpectedly resolves to a real IP address on certain test hosts, with a custom `ServerSocket` bootstrapped by the test.
>>
>> The initial PR contains 3 commits:
>>
>> 1. b06f2606c88 Replace external domain with a custom `ServerSocket` (i.e., _"the fix"_)
>> 2. b9262c7ca01 Remove the need for multiple test files
>> 3. d95a335db93 Migrate tests to JUnit
>>
>> All commits (i.e., 1, 1+2, and 1+2+3) pass tests.
>
> test/jdk/java/net/httpclient/ConnectTimeoutTest.java line 108:
>
>> 106: "Failed creating client socket %s/%s",
>> 107: (socketIndex + 1), socketCount);
>> 108: throw new RuntimeException(message, ioe);
>
> why not `UncheckedIOException`? alternatively a simple for loop ...
Have you tried to uncondiotionnaly throw an exception here to see how it shows up in the test log? IIRC throwing in static initializer in test classes didn't give very user friendly diagnosis. But I have never seen how it looked like with junit :-)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29431#discussion_r2731195802
More information about the net-dev
mailing list