ableegoldman commented on a change in pull request #10609: URL: https://github.com/apache/kafka/pull/10609#discussion_r632025872
########## File path: streams/src/test/java/org/apache/kafka/streams/processor/internals/StateDirectoryTest.java ########## @@ -372,29 +356,25 @@ public void shouldReturnEmptyArrayIfListFilesReturnsNull() throws IOException { assertTrue(appDir.createNewFile()); assertTrue(appDir.exists()); assertNull(appDir.listFiles()); - assertEquals(0, directory.listAllTaskDirectories().length); + assertEquals(0, directory.listAllTaskDirectories().size()); } @Test public void shouldOnlyListNonEmptyTaskDirectories() throws IOException { TestUtils.tempDirectory(stateDir.toPath(), "foo"); - final File taskDir1 = directory.getOrCreateDirectoryForTask(new TaskId(0, 0)); - final File taskDir2 = directory.getOrCreateDirectoryForTask(new TaskId(0, 1)); + final TaskDirectory taskDir1 = new TaskDirectory(directory.getOrCreateDirectoryForTask(new TaskId(0, 0)), null); Review comment: Actually that comment was more about usages in integration/other unit tests, where we may want to tie in some NamedTopologyies once the basic feature is fully implemented. For the StateDirectoryTest everything should already be implemented so we should have the NamedTopology logic in that class covered by tests in this PR (actually I need to add a few more, I think) ########## File path: streams/src/test/java/org/apache/kafka/streams/processor/internals/StateDirectoryTest.java ########## @@ -372,29 +356,25 @@ public void shouldReturnEmptyArrayIfListFilesReturnsNull() throws IOException { assertTrue(appDir.createNewFile()); assertTrue(appDir.exists()); assertNull(appDir.listFiles()); - assertEquals(0, directory.listAllTaskDirectories().length); + assertEquals(0, directory.listAllTaskDirectories().size()); } @Test public void shouldOnlyListNonEmptyTaskDirectories() throws IOException { TestUtils.tempDirectory(stateDir.toPath(), "foo"); - final File taskDir1 = directory.getOrCreateDirectoryForTask(new TaskId(0, 0)); - final File taskDir2 = directory.getOrCreateDirectoryForTask(new TaskId(0, 1)); + final TaskDirectory taskDir1 = new TaskDirectory(directory.getOrCreateDirectoryForTask(new TaskId(0, 0)), null); Review comment: That comment was more about usages in integration/other unit tests, where we may want to tie in some NamedTopologyies once the basic feature is fully implemented. For the StateDirectoryTest everything should already be implemented so we should have the NamedTopology logic in that class covered by tests in this PR (actually I need to add a few more, I think) -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org