janhoy commented on a change in pull request #407:
URL: https://github.com/apache/solr/pull/407#discussion_r746386829



##########
File path: solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java
##########
@@ -172,39 +179,46 @@ public static String legacyExampleCollection1SolrHome() {
     if (sourceHome == null)
       throw new IllegalStateException("No source home! Cannot create the 
legacy example solr home directory.");
 
-    String legacyExampleSolrHome = null;
     try {
-      File tempSolrHome = LuceneTestCase.createTempDir().toFile();
-      org.apache.commons.io.FileUtils.copyFileToDirectory(new File(sourceHome, 
"server/solr/solr.xml"), tempSolrHome);
-      File collection1Dir = new File(tempSolrHome, "collection1");
-      org.apache.commons.io.FileUtils.forceMkdir(collection1Dir);
+      Path tempSolrHome = LuceneTestCase.createTempDir();
+      Files.copy(Path.of(sourceHome, "server", "solr", "solr.xml"), 
tempSolrHome.resolve("solr.xml"));
+
+      Path collection1Dir = tempSolrHome.resolve("collection1");
+      Files.createDirectories(collection1Dir.resolve("conf"));
+
+      Path configSetDir = Path.of(sourceHome, "server", "solr", "configsets", 
"sample_techproducts_configs", "conf");
+
+      Files.walkFileTree(configSetDir, new SimpleFileVisitor<>() {

Review comment:
       Should we move this copy-files code to a Solr Utils class?




-- 
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

Reply via email to