RFR: 8378344: Refactor test/jdk/java/net/httpclient/*.java TestNG tests to JUnit [v3]
Daniel Fuchs
dfuchs at openjdk.org
Tue Feb 24 12:08:03 UTC 2026
On Tue, 24 Feb 2026 08:39:37 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:
>> Daniel Fuchs has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Review feedback: introduce actual/expected
>
> test/jdk/java/net/httpclient/AbstractNoBody.java line 58:
>
>> 56: // to this.getClass() in methods that are called from
>> 57: // @BeforeAll and @AfterAll
>> 58: @TestInstance(TestInstance.Lifecycle.PER_CLASS)
>
> AFAICS, judging from `AbstractNoBody` and all its subclasses, `AbstractNoBody::printStamp` is the only place needing `getClass()`. You can alternatively consider simply removing that usage — I doubt if it is adding much value.
I'd rather keep like that. It's a good reason to keep `Lifecycle.PER_CLASS`.
> test/jdk/java/net/httpclient/UserCookieTest.java line 186:
>
>> 184: assertEquals( expectedCookies.stream()
>> 185: .filter(s -> !s.startsWith("LOC"))
>> 186: .toList(), response.headers().allValues("X-Request-Cookie"));
>
> Whitespace needs to be removed. You can also consider creating `{expect,actual}Cookies` variables.
Done.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29850#discussion_r2846598844
PR Review Comment: https://git.openjdk.org/jdk/pull/29850#discussion_r2846600275
More information about the net-dev
mailing list