On Tue, 3 Feb 2026 22:09:58 GMT, Justin Lu <[email protected]> wrote:

> This PR consists of a conversion for the java/util/zip TestNG tests to JUnit. 
> Changes are mainly automated. 
> https://github.com/openjdk/jdk/commit/1aeb8a634b8f255853516015f4b39bd79dd94090
>  is required to resolve a failure since JUnit parameterized tests 
> automatically close arguments that implement `AutoCloseable`.
> 
> Test stats before:
> Framework-based tests: 274 = 107 TestNG + 167 JUnit
> 
> Test stats after:
> Framework-based tests: 274 = 0 TestNG + 274 JUnit

test/jdk/java/util/zip/DeflaterDictionaryTests.java line 113:

> 111: 
> 112:             Assertions.assertEquals(resultLength, SRC_DATA.length());
> 113:             Assertions.assertArrayEquals(Arrays.copyOf(result, 
> resultLength), input);

I think we should restore the original order here - maybe someone used testng 
the junit way. Same below.

test/jdk/java/util/zip/ZipFile/ZipFileDuplicateEntryTest.java line 289:

> 287:                             ze.getName(), ze.isDirectory(), new 
> String(bytes));
> 288:                 }
> 289:                 assertArrayEquals(bytes, entry.bytes,

Let's reverse this one. This test is really weird with a mix of styles.

test/jdk/java/util/zip/ZipFile/ZipFileDuplicateEntryTest.java line 365:

> 363:         try (ZipFile zf = new ZipFile(ZIP_FILE.toFile())) {
> 364:             List<? extends ZipEntry> entries = 
> zf.stream().collect(Collectors.toList());
> 365:             assertEquals(entries.size(), EXPECTED_ENTRIES.size());

Let's reverse this one.

test/jdk/java/util/zip/ZipFile/ZipFileDuplicateEntryTest.java line 390:

> 388:                         entry.name, je.getMethod(), entry.method);
> 389:             }
> 390:             assertEquals(je.getMethod(), entry.method);

Let's reverse this one, entry.method is called "Expected Method" above.

test/jdk/java/util/zip/ZipFile/ZipFileDuplicateEntryTest.java line 490:

> 488:         try (JarFile jf = new JarFile(TEST_JAR.toFile())) {
> 489:             List<? extends JarEntry> entries = 
> jf.stream().collect(Collectors.toList());
> 490:             assertEquals(jf.size(), EXPECTED_ENTRIES.size());

Let's reverse the order of this one

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/29552#discussion_r2762072205
PR Review Comment: https://git.openjdk.org/jdk/pull/29552#discussion_r2762096913
PR Review Comment: https://git.openjdk.org/jdk/pull/29552#discussion_r2762096178
PR Review Comment: https://git.openjdk.org/jdk/pull/29552#discussion_r2762093887
PR Review Comment: https://git.openjdk.org/jdk/pull/29552#discussion_r2762092307

Reply via email to