Apache Lucene open-source search software
SOLR-14217: tests respect tests.workDir correctly (prevent SSD destruction)
Robert Muir5f964eeef2fe
diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.javaindex 585f3bc8e39..c7e8637e3d9 100644--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java@@ -143,6 +143,7 @@ import org.apache.solr.servlet.DirectSolrConnection;import org.apache.solr.update.processor.DistributedUpdateProcessor;import org.apache.solr.update.processor.DistributedZkUpdateProcessor;import org.apache.solr.update.processor.UpdateRequestProcessor;+import org.apache.solr.util.ExternalPaths;import org.apache.solr.util.LogLevel;import org.apache.solr.util.RandomizeSSL;import org.apache.solr.util.RandomizeSSL.SSLRandomizer;@@ -285,6 +286,8 @@ public abstract class SolrTestCaseJ4 extends SolrTestCase {new SolrjNamedThreadFactory("testExecutor"),true);+ // set solr.install.dir needed by some test configs outside of the test sandbox (!)+ System.setProperty("solr.install.dir", ExternalPaths.SOURCE_HOME);// not strictly needed by this class at this point in the control lifecycle, but for// backcompat create it now in case any third party tests expect initCoreDataDir to be// non-null after calling setupTestCases()