8373807: test/jdk/java/net/httpclient/websocket/DummyWebSocketServer.java getURI() uses "localhost"#28864
8373807: test/jdk/java/net/httpclient/websocket/DummyWebSocketServer.java getURI() uses "localhost"#28864dfuch wants to merge 1 commit intoopenjdk:masterfrom
Conversation
…java getURI() uses "localhost"
|
👋 Welcome back dfuchs! A progress list of the required criteria for merging this PR into |
|
@dfuch This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 1 new commit pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
| return URI.create("ws://localhost:" + address.getPort()); | ||
| String ip = address.getAddress().isAnyLocalAddress() | ||
| ? InetAddress.getLoopbackAddress().getHostAddress() | ||
| : address.getAddress().getHostAddress(); |
There was a problem hiding this comment.
Hello Daniel, this looks OK to me. But given that we always use loopback address to bind the ServerSocketChannel in this test (line 333), can we just use loopback address here too?
There was a problem hiding this comment.
We could - I added a check to .isAnyLocalAddress() to make it generic and not make any assumption on the address the server would bind to.
|
/integrate |
|
Going to push as commit f3a4856.
Your commit was automatically rebased without conflicts. |
The WebSockteTest was observed failing in timeout once, waiting for the completable future returned by
WebSocketBuilder::buildto complete. The suspicion is that it may have been caused by the request being misdirected due to the use of "localhost" in the URI.This trivial fix ensures that the DumyWebSocketServer::getURI returns a URI with a literal IP address instead of relying on "localhost".
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/28864/head:pull/28864$ git checkout pull/28864Update a local copy of the PR:
$ git checkout pull/28864$ git pull https://git.openjdk.org/jdk.git pull/28864/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 28864View PR using the GUI difftool:
$ git pr show -t 28864Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28864.diff
Using Webrev
Link to Webrev Comment