dsmiley commented on code in PR #3263: URL: https://github.com/apache/solr/pull/3263#discussion_r1996582566
########## solr/core/src/test/org/apache/solr/cli/ZkSubcommandsTest.java: ########## @@ -353,13 +376,21 @@ public void testUpConfigLinkConfigClearZk() throws Exception { assertEquals(0, runTool(args, configSetUploadTool)); assertTrue(zkClient.exists(ZkConfigSetService.CONFIGS_ZKNODE + "/" + confsetname, true)); + final Path confDir = Path.of(ExternalPaths.TECHPRODUCTS_CONFIGSET); Review Comment: `ExternalPaths.TECHPRODUCTS_CONFIGSET` should be a Path ########## solr/core/src/test/org/apache/solr/cli/ZkSubcommandsTest.java: ########## @@ -403,30 +435,24 @@ public void testUpConfigLinkConfigClearZk() throws Exception { Path confSetDir = configSetDir.resolve("conf"); try (Stream<Path> filesStream = Files.list(confSetDir)) { + List<Path> files = filesStream.toList(); zkFiles = zkClient.getChildren(ZkConfigSetService.CONFIGS_ZKNODE + "/" + confsetname, null, true); - long fileCount = filesStream.count(); assertEquals( - "Comparing original conf files that were to be uploaded to what is in ZK", - fileCount, + "Comparing original conf files that were to be uploadedto what is in ZK", Review Comment: ```suggestion "Comparing original conf files that were to be uploaded to what is in ZK", ``` ########## solr/core/src/test/org/apache/solr/cli/ZkSubcommandsTest.java: ########## @@ -403,30 +435,24 @@ public void testUpConfigLinkConfigClearZk() throws Exception { Path confSetDir = configSetDir.resolve("conf"); try (Stream<Path> filesStream = Files.list(confSetDir)) { + List<Path> files = filesStream.toList(); zkFiles = zkClient.getChildren(ZkConfigSetService.CONFIGS_ZKNODE + "/" + confsetname, null, true); - long fileCount = filesStream.count(); assertEquals( - "Comparing original conf files that were to be uploaded to what is in ZK", - fileCount, + "Comparing original conf files that were to be uploadedto what is in ZK", + files.size(), zkFiles.size()); - assertEquals("Comparing downloaded files to what is in ZK", fileCount, zkFiles.size()); + assertEquals("Comparing downloaded files to what is in ZK", files.size(), zkFiles.size()); } Path sourceConfDir = Path.of(ExternalPaths.TECHPRODUCTS_CONFIGSET); // filter out all directories starting with . (e.g. .svn) - try (Stream<Path> filesStream = Files.list(sourceConfDir)) { + try (Stream<Path> stream = Files.walk(sourceConfDir)) { List<Path> files = - filesStream - .filter( - (path -> { - if (!Files.isDirectory(path)) { - return false; - } - return !path.getFileName().toString().startsWith("."); - })) + stream + .filter(Files::isRegularFile) + .filter(path -> path.getFileName().toString().matches("[^\\.].*")) Review Comment: what was wrong with startsWith? ########## solr/core/src/test/org/apache/solr/cli/ZkSubcommandsTest.java: ########## @@ -383,7 +414,8 @@ public void testUpConfigLinkConfigClearZk() throws Exception { // test down config Path configSetDir = - tmpDir.resolve( + Path.of( + tmpDir.toString(), Review Comment: why not as it was, resolve()? -- 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: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org