RFR: 8295777: java/net/httpclient/ConnectExceptionTest.java should not rely on system resolver

Daniel Fuchs dfuchs at openjdk.org
Fri Oct 21 10:36:48 UTC 2022


On Fri, 21 Oct 2022 09:54:13 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:

> This PR makes ConnectExceptionTest use a non-existent hosts file for name resolution.
> 
> The test verifies that the HttpClient throws a ConnectException in response to DNS resolution failures. Slow name resolution makes this test take more time to complete. With this patch applied, the test becomes independent from external DNS services.
> 
> The test continues to pass.

Marked as reviewed by dfuchs (Reviewer).

Ok - so the expectation is that this test will never need to successfully resolve any address - right?
If so looks good.

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

PR: https://git.openjdk.org/jdk/pull/10811


More information about the net-dev mailing list