On Fri, 17 Apr 2026 08:14:19 GMT, Daniel Fuchs <[email protected]> wrote:
>> Please find here a small change that converts `java.logging` TestNG tests to >> use JUnit. Most java.logging tests are plain jtreg tests, so this is a small >> set. >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Daniel Fuchs has updated the pull request incrementally with one additional > commit since the last revision: > > Review feedback test/jdk/java/util/logging/LogRecordThreadIdTest.java line 46: > 44: private static LogRecord record, record1, record2; > 45: > 46: @BeforeAll LogRecordThreadIdTest previously used TestNG @BeforeTest, which runs before each @Test method, so each test started with freshly constructed LogRecord instances. With JUnit @BeforeAll + static fields, the same instances are reused. The assertions still look safe because each test overwrites the state it cares about, but could you confirm this was intentional? If you want to preserve the old “fresh records per test” behavior, @BeforeEach (possibly with non-static fields) would be closer to TestNG. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/30769#discussion_r3108152281
