majialoong commented on code in PR #23428:
URL: https://github.com/apache/kafka/pull/23428#discussion_r3999565105


##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/StateDirectoryTest.java:
##########
@@ -446,13 +434,13 @@ public void shouldOnlyListNonEmptyTaskDirectories() 
throws IOException {
         final File storeDir = new File(taskDir1.file(), "store");
         assertTrue(storeDir.mkdir());
 
-        assertThat(Set.of(taskDir1, taskDir2), equalTo(new 
HashSet<>(directory.listAllTaskDirectories())));
-        assertThat(singletonList(taskDir1), 
equalTo(directory.listNonEmptyTaskDirectories()));
+        assertEquals(Set.of(taskDir1, taskDir2), new 
HashSet<>(directory.listAllTaskDirectories()));

Review Comment:
   That’s an interesting question. From a quick look at the code, I think the 
set conversion is mainly to avoid asserting an order that `File.listFiles()` 
does not guarantee. These methods seem to simply collect directory entries for 
iteration, so returning a `List` also seems fine.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to