[jdk25u-dev] Integrated: 8373807: test/jdk/java/net/httpclient/websocket/DummyWebSocketServer.java getURI() uses "localhost"

Roland Mesde duke at openjdk.org
Thu Jan 29 19:47:56 UTC 2026


On Tue, 27 Jan 2026 17:17:24 GMT, Roland Mesde <duke at openjdk.org> wrote:

> Backporting JDK-8373807: test/jdk/java/net/httpclient/websocket/DummyWebSocketServer.java getURI() uses "localhost".
> 
> The WebSocketTest experienced an intermittent timeout failure where WebSocketBuilder::build's CompletableFuture never completed. 
> 
> Root Cause (suspected): Request misdirection due to using "localhost" in the URI, which can resolve to either IPv4 (127.0.0.1) or IPv6 (::1) depending on system configuration.
> 
> Fix: Change DummyWebSocketServer::getURI to return a URI with a literal IP address instead of "localhost" to ensure consistent address resolution and prevent misdirection.
> 
> For parity with Oracle JDK.
> 
> Ran related tests on linux-x64, linux-aarch64, macos-aarch64 and windows-x64:
> 
> make test TEST=test/jdk/java/net/httpclient/websocket
> 
> Results attached:
> 
> [macos-aarch64-specific-test.log](https://github.com/user-attachments/files/24893936/macos-aarch64-specific-test.log)
> [windows-x64-specific-test.log](https://github.com/user-attachments/files/24894835/windows-x64-specific-test.log)
> [linux-x64-specific-test.log](https://github.com/user-attachments/files/24894836/linux-x64-specific-test.log)
> [linux-aarch64-specific-test.log](https://github.com/user-attachments/files/24894837/linux-aarch64-specific-test.log)

This pull request has now been integrated.

Changeset: a195e8a8
Author:    Roland Mesde <mesde at amazon.com>
Committer: Paul Hohensee <phh at openjdk.org>
URL:       https://git.openjdk.org/jdk25u-dev/commit/a195e8a8b1bb94a24e37dd27863b8a157d1d120a
Stats:     8 lines in 1 file changed: 7 ins; 0 del; 1 mod

8373807: test/jdk/java/net/httpclient/websocket/DummyWebSocketServer.java getURI() uses "localhost"

Backport-of: f3a48560b5e3a280f6f76031eb3d475ff9ee49f4

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

PR: https://git.openjdk.org/jdk25u-dev/pull/189


More information about the jdk-updates-dev mailing list