You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ds...@apache.org on 2022/03/10 20:09:56 UTC
[solr] branch main updated: SOLR-14290: Fix NPE by external users of SolrTestCaseJ4 (#739)
This is an automated email from the ASF dual-hosted git repository.
dsmiley pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new 6ad4267 SOLR-14290: Fix NPE by external users of SolrTestCaseJ4 (#739)
6ad4267 is described below
commit 6ad42676d3a7fcf185bd403d3d7395da9ef7bda2
Author: David Smiley <ds...@salesforce.com>
AuthorDate: Thu Mar 10 15:09:47 2022 -0500
SOLR-14290: Fix NPE by external users of SolrTestCaseJ4 (#739)
---
solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
index 0c3d47c..6c11cc7 100644
--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
@@ -283,7 +283,9 @@ public abstract class SolrTestCaseJ4 extends SolrTestCase {
true);
// set solr.install.dir needed by some test configs outside of the test sandbox (!)
- System.setProperty("solr.install.dir", ExternalPaths.SOURCE_HOME);
+ if (ExternalPaths.SOURCE_HOME != null) {
+ 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()