SOLR-14934: Fix some additional test helper methods that aren't used on master but triggered problems when when backporting to branch_8x

This commit is contained in:
Chris Hostetter 2020-12-02 13:35:33 -07:00
parent 8732df8c50
commit 05a8477a36
1 changed files with 2 additions and 0 deletions

View File

@ -818,6 +818,7 @@ public abstract class SolrTestCaseJ4 extends SolrTestCase {
public static CoreContainer createCoreContainer(Path solrHome, String solrXML) { public static CoreContainer createCoreContainer(Path solrHome, String solrXML) {
testSolrHome = requireNonNull(solrHome); testSolrHome = requireNonNull(solrHome);
System.setProperty("solr.solr.home", solrHome.toAbsolutePath().toString());
h = new TestHarness(solrHome, solrXML); h = new TestHarness(solrHome, solrXML);
lrf = h.getRequestFactory("", 0, 20, CommonParams.VERSION, "2.2"); lrf = h.getRequestFactory("", 0, 20, CommonParams.VERSION, "2.2");
return h.getCoreContainer(); return h.getCoreContainer();
@ -840,6 +841,7 @@ public abstract class SolrTestCaseJ4 extends SolrTestCase {
public static CoreContainer createDefaultCoreContainer(Path solrHome) { public static CoreContainer createDefaultCoreContainer(Path solrHome) {
testSolrHome = requireNonNull(solrHome); testSolrHome = requireNonNull(solrHome);
System.setProperty("solr.solr.home", solrHome.toAbsolutePath().toString());
h = new TestHarness("collection1", initAndGetDataDir().getAbsolutePath(), "solrconfig.xml", "schema.xml"); h = new TestHarness("collection1", initAndGetDataDir().getAbsolutePath(), "solrconfig.xml", "schema.xml");
lrf = h.getRequestFactory("", 0, 20, CommonParams.VERSION, "2.2"); lrf = h.getRequestFactory("", 0, 20, CommonParams.VERSION, "2.2");
return h.getCoreContainer(); return h.getCoreContainer();