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


##########
solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java:
##########
@@ -95,11 +99,22 @@
 public abstract class SolrExampleTests extends SolrExampleTestsBase {
   private static final Logger log = 
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
+  @BeforeClass
+  public static void beforeTest() throws Exception {
+    EnvUtils.setProperty(
+        ALLOW_PATHS_SYSPROP, 
ExternalPaths.SERVER_HOME.toAbsolutePath().toString());
+    solrTestRule.startSolr(createTempDir());
+    solrTestRule
+        .newCollection(DEFAULT_TEST_COLLECTION_NAME)
+        .withConfigSet(ExternalPaths.TECHPRODUCTS_CONFIGSET)
+        .create();
+  }
+
   @Before
   public void emptyCollection() throws Exception {
     SolrClient client = getSolrClient();
     // delete everything!
-    client.deleteByQuery("*:*");
+    client.deleteByQuery(DEFAULT_TEST_COLLECTION_NAME, "*:*");
     client.commit();

Review Comment:
   I backed out the change since we HAVE the `setDefaultCollection`...



##########
solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleEmbeddedTest.java:
##########
@@ -17,17 +17,10 @@
 package org.apache.solr.client.solrj.embedded;
 
 import org.apache.solr.client.solrj.SolrExampleTests;
-import org.junit.BeforeClass;
 
 /**
  * This runs SolrServer test using
  *
  * @since solr 1.3
  */
-public class SolrExampleEmbeddedTest extends SolrExampleTests {
-
-  @BeforeClass

Review Comment:
   Thanks



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