8378398: Modernize test/jdk/java/net/URLClassLoader/HttpTest.java#29864
8378398: Modernize test/jdk/java/net/URLClassLoader/HttpTest.java#29864eirbjo wants to merge 8 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back eirbjo! A progress list of the required criteria for merging this PR into |
|
@eirbjo 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 132 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
dfuch
left a comment
There was a problem hiding this comment.
Hi Eirik, overall good cleanup!
| @@ -25,232 +25,245 @@ | |||
| * @test | |||
| * @bug 4636331 | |||
| * @library /test/lib | |||
| * @summary Check that URLClassLoader doesn't create excessive http | |||
| * connections | |||
| * @summary Check that URLClassLoader with HTTP paths lookups produce the expected http requests | |||
There was a problem hiding this comment.
Since the test is now using jdk.httpserver we should add
@modules jdk.httpserver
Please give us some time to verify that the new test is stable in the CI.
There was a problem hiding this comment.
Since the test is now using jdk.httpserver we should add
@modules jdk.httpserver
Thanks, fixed.
Please give us some time to verify that the new test is stable in the CI.
Based on the discussion in https://mail.openjdk.org/pipermail/net-dev/2026-February/030179.html, I opted to add some more redirect tests (including failing redirect targets) and to add note comments / notes explaining the somewhat suboptimal, but long-standing redirect behavior.
Could you take a look at those and re-spin any testing?
…:getResourceAsStream
…other test where the redirect location returns 404 Not Found.
|
Thanks Daniel for the review and help in CI testing! /integrate |
|
Going to push as commit 3b8abd4.
Your commit was automatically rebased without conflicts. |
Please review this PR which modernizes
test/jdk/java/net/URLClassLoader/HttpTest.java, a test verifying HTTP requests made by a URLClassLoader with HTTP search paths.The test is updated to replace a custom
HttpServerclass with one usingcom.sun.net.httpserver. Instead of simply counting GET and HEAD requests, the test now captures each request's method and URI in a log, which allows more precise asserts on the expected request patterns.The test is updated to use JUnit 5.
For good measure, some negative test methods are added, verifying expected HTTP requests when one of the HTTP paths returns a 404 response.
Test-only enhancement,
noreg-selfProgress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/29864/head:pull/29864$ git checkout pull/29864Update a local copy of the PR:
$ git checkout pull/29864$ git pull https://git.openjdk.org/jdk.git pull/29864/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 29864View PR using the GUI difftool:
$ git pr show -t 29864Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/29864.diff
Using Webrev
Link to Webrev Comment