dsmiley commented on code in PR #3263: URL: https://github.com/apache/solr/pull/3263#discussion_r2001745884
########## solr/core/src/test/org/apache/solr/update/CustomTLogDirTest.java: ########## @@ -161,13 +163,20 @@ private static void validateTlogPath( client.add(sdoc("id", "3")); client.commit(); - File[] list = - resolvedTlogDir.toFile().listFiles((f) -> f.isFile() && f.getName().startsWith("tlog.")); - - assertNotNull(list); - assertEquals(1, list.length); - CoreContainer cc = ((EmbeddedSolrServer) client).getCoreContainer(); - cc.unload(collectionName, true, true, true); - assertFalse(resolvedTlogDir.toFile().exists()); + try (Stream<Path> files = Files.list(resolvedTlogDir)) { + List<Path> list = + files + .filter( + file -> { + return Files.isRegularFile(file) Review Comment: can remove the return and braces (as before) ########## solr/core/src/test/org/apache/solr/AnalysisAfterCoreReloadTest.java: ########## @@ -41,9 +41,9 @@ public class AnalysisAfterCoreReloadTest extends SolrTestCaseJ4 { @BeforeClass public static void beforeClass() throws Exception { - String tmpSolrHome = createTempDir().toFile().getAbsolutePath(); - FileUtils.copyDirectory(new File(TEST_HOME()), new File(tmpSolrHome).getAbsoluteFile()); - initCore("solrconfig.xml", "schema.xml", new File(tmpSolrHome).getAbsolutePath()); + Path tmpSolrHome = createTempDir().toAbsolutePath(); + PathUtils.copyDirectory(TEST_HOME(), tmpSolrHome, StandardCopyOption.COPY_ATTRIBUTES); + initCore("solrconfig.xml", "schema.xml", tmpSolrHome.toAbsolutePath()); } Review Comment: it's *already* absolute! (and temp dirs are anyway) -- 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