epugh commented on code in PR #3947:
URL: https://github.com/apache/solr/pull/3947#discussion_r2658904264


##########
solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java:
##########
@@ -26,58 +25,54 @@
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
-import org.apache.commons.io.file.PathUtils;
-import org.apache.solr.SolrJettyTestBase;
+import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrServerException;
-import org.apache.solr.client.solrj.request.CoreAdminRequest;
 import org.apache.solr.client.solrj.request.SolrQuery;
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.SolrInputDocument;
 import org.apache.solr.common.params.ShardParams;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.response.SolrQueryResponse;
+import org.apache.solr.util.ExternalPaths;
+import org.apache.solr.util.SolrJettyTestRule;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
+import org.junit.ClassRule;
 import org.junit.Test;
 
-public class DistributedDebugComponentTest extends SolrJettyTestBase {
+public class DistributedDebugComponentTest extends SolrTestCaseJ4 {
+
+  @ClassRule public static SolrJettyTestRule solrTestRule = new 
SolrJettyTestRule();
 
   private static SolrClient collection1;
   private static SolrClient collection2;
   private static String shard1;
   private static String shard2;
 
-  private static Path createSolrHome() throws Exception {
-    Path workDir = createTempDir();
-    setupJettyTestHome(workDir, "collection1");
-    PathUtils.copyDirectory(workDir.resolve("collection1"), 
workDir.resolve("collection2"));
-    return workDir;
-  }
-
   @BeforeClass
   public static void createThings() throws Exception {
     systemSetPropertyEnableUrlAllowList(false);
-    Path solrHome = createSolrHome();
-    createAndStartJetty(solrHome);
-    String url = getBaseUrl();
-
-    collection1 = getHttpSolrClient(url, "collection1");
-    collection2 = getHttpSolrClient(url, "collection2");
-
-    String urlCollection1 = getBaseUrl() + "/" + "collection1";
-    String urlCollection2 = getBaseUrl() + "/" + "collection2";
+    solrTestRule.startSolr(createTempDir());
+
+    solrTestRule
+        .newCollection("collection1")
+        .withConfigSet(ExternalPaths.TECHPRODUCTS_CONFIGSET)
+        .create();
+    solrTestRule
+        .newCollection("collection2")
+        .withConfigSet(ExternalPaths.TECHPRODUCTS_CONFIGSET)
+        .create();
+    var cc = solrTestRule.getCoreContainer();
+    cc.waitForLoadingCoresToFinish(30000);

Review Comment:
   I have added a fix for this (and the one in the PrometheusWriterTest) in 
#3988 3988



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to