RFR: 8378164: test/jdk/java/net/httpclient/http3/*.java: convert tests that use ITestContext to JUnit [v3]
Daniel Fuchs
dfuchs at openjdk.org
Tue Feb 24 12:20:36 UTC 2026
On Mon, 23 Feb 2026 20:59:23 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:
>> test/jdk/java/net/httpclient/http3/H3DataLimitsTest.java line 228:
>>
>>> 226: }
>>> 227:
>>> 228: @BeforeAll
>>
>> I see TestNG `{Before,After}Test` tags converted to JUnit `{Before,After}All` tags, whereas their JUnit equivalents should have been `{Before,After}Each`. Is this intentional?
>>
>> Note that in this particular file, there are multiple test methods. Before this PR, each was getting its own bootstrapped environment. Now they all will share the same. While it is good that they share resources, could it be that we incorrectly remove certain test assumptions?
>
> Nevermind. Judging from [the TestNG docs], `{Before,After}Test`-to-`{Before,After}All` is be fine. We just need to keep an eye on `{Before,After}Method`.
>
> [the TestNG docs]: https://testng.org/annotations.html
Yes - I believe Before/After Class was meant there anyway. IIRC TestNG has also Before/After Method - which is the equivalent of Before/After Each.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29824#discussion_r2846689803
More information about the net-dev
mailing list