RFR: 8308336: Test java/net/HttpURLConnection/HttpURLConnectionExpectContinueTest.java failed: java.net.BindException: Address already in use [v2]
Darragh Clarke
duke at openjdk.org
Thu Jun 8 14:14:50 UTC 2023
On Wed, 7 Jun 2023 10:11:22 GMT, Mark Sheppard <msheppar at openjdk.org> wrote:
>> test/jdk/java/net/HttpURLConnection/HttpURLConnectionExpectContinueTest.java line 76:
>>
>>> 74: control.serverSocket = new ServerSocket();
>>> 75: control.serverSocket.setReuseAddress(true);
>>> 76: control.serverSocket.bind(new InetSocketAddress("127.0.0.1", 0));
>>
>> While you're at it can you change the address to use `InetAddress.getLoopbackAddress()`here, and the URIBuilder in createConnection() below?
>
> based on Daniel's last comment and requested change then I think it would be useful to add two additional run requests to the test which set the network properties java.net.preferIPv4Stack=true and java.net.preferIPv6Addresses=true, for completeness.
> You never know what might "pop out of the woodwork"
I added those changes and verified that the tests are still passing
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14177#discussion_r1223102358
More information about the net-dev
mailing list