On Thu, 12 Feb 2026 19:02:54 GMT, Daniel Fuchs <[email protected]> wrote:
> Some HttpClient tests - like `test/jdk/java/net/httpclient/SmokeTest.java`, > depend on non-library test classes that were developed for testing the > HttpServer, such as `../../../com/sun/net/httpserver/FileServerHandler.java` > which requires compiling using `@compile`. > > Instead of depending on HttpServer test classes, these tests should use > functionalities from the common servers provided by the `HttpServerAdapters`, > offered by the `test/jdk/java/net/httpclient/lib` library. An adapted version > of the `../../../com/sun/net/httpserver/FileServerHandler.java` could be > provided by the `HttpServerAdapters` helper. > > There are also 5 implementations of stand-alone echo handlers in the > httpclient test base. This change remove 4 of them, keep only the > implementation in `HttpServerAdapters`, and updates all tests that were > relying on the removed implementations to use that provided by > `HttpServerAdapters`. > > This is a test-only change. This pull request has now been integrated. Changeset: c78a2a8c Author: Daniel Fuchs <[email protected]> URL: https://git.openjdk.org/jdk/commit/c78a2a8c34790c86087d85952c54bf889f09acbe Stats: 1141 lines in 17 files changed: 341 ins; 539 del; 261 mod 8377675: java.net.http tests should not depend on ../../../com/sun/net/httpserver test classes Reviewed-by: djelinski, jpai ------------- PR: https://git.openjdk.org/jdk/pull/29702
