Integrated: 8378398: Modernize test/jdk/java/net/URLClassLoader/HttpTest.java
Eirik Bjørsnøs
eirbjo at openjdk.org
Thu Feb 26 15:16:04 UTC 2026
On Sun, 22 Feb 2026 10:56:11 GMT, Eirik Bjørsnøs <eirbjo at openjdk.org> wrote:
> 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 `HttpServer` class with one using `com.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-self`
This pull request has now been integrated.
Changeset: 3b8abd45
Author: Eirik Bjørsnøs <eirbjo at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/3b8abd459ffc195957a8cb6a45d4e72e100099cc
Stats: 367 lines in 1 file changed: 178 ins; 113 del; 76 mod
8378398: Modernize test/jdk/java/net/URLClassLoader/HttpTest.java
Reviewed-by: dfuchs
-------------
PR: https://git.openjdk.org/jdk/pull/29864
More information about the net-dev
mailing list