SOLR-14217: tests respect tests.workDir correctly (prevent SSD destruction)

This commit is contained in:
Robert Muir 2020-01-27 06:07:31 -05:00
parent 02f862670e
commit 5f964eeef2
No known key found for this signature in database
GPG Key ID: 817AE1DD322D7ECA
1 changed files with 3 additions and 0 deletions

View File

@ -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()