RFR: 8377675: java.net.http tests should not depend on ../../../com/sun/net/httpserver test classes [v2]
Jaikiran Pai
jpai at openjdk.org
Fri Feb 13 10:24:13 UTC 2026
On Fri, 13 Feb 2026 10:20:08 GMT, Daniel Fuchs <dfuchs at openjdk.org> 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.
>
> Daniel Fuchs has updated the pull request incrementally with one additional commit since the last revision:
>
> Review feedback - Copyright Years
Thank you for the update. Looks good to me.
-------------
Marked as reviewed by jpai (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/29702#pullrequestreview-3796433959
More information about the net-dev
mailing list