RFR: 8308336: Test java/net/HttpURLConnection/HttpURLConnectionExpectContinueTest.java failed: java.net.BindException: Address already in use [v2]
Daniel Fuchs
dfuchs at openjdk.org
Thu Jun 8 15:10:51 UTC 2023
On Thu, 8 Jun 2023 14:25:20 GMT, Mark Sheppard <msheppar at openjdk.org> wrote:
>> Darragh Clarke has updated the pull request incrementally with one additional commit since the last revision:
>>
>> implemented feedback
>
> test/jdk/java/net/HttpURLConnection/HttpURLConnectionExpectContinueTest.java line 428:
>
>> 426: URL url = URIBuilder.newBuilder()
>> 427: .scheme("http")
>> 428: .host(InetAddress.getLoopbackAddress())
>
> This will change the call flow of the test in a slightly subtle way. In the original the "host" is supplied i.e. localhost which should map to the loopback address, and in the change the loopback IP address is being supplied diectly. In terms of equivalence then supplying a host string might be more appropriate:
> .host("localhost")
No that's precisely what we want to avoid. Because how "localhost" maps to an InetAddress depends on the machine configuration, which is a recipe for intermittent failures.
I'd suggest:
URL url = URIBuilder.newBuilder()
.scheme("http")
.localhost()
(which is actually the same)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14177#discussion_r1223187935
More information about the net-dev
mailing list