Apache Solr open-source search software
SOLR-16573: Fix tests RE solr.test.sys.prop1
David Smileycada03b20e4c
diff --git a/solr/core/src/test/org/apache/solr/update/RootFieldTest.java b/solr/core/src/test/org/apache/solr/update/RootFieldTest.javaindex 372c6ac08ed..12cb5f6b35a 100644--- a/solr/core/src/test/org/apache/solr/update/RootFieldTest.java+++ b/solr/core/src/test/org/apache/solr/update/RootFieldTest.java@@ -45,12 +45,14 @@ public class RootFieldTest extends EmbeddedSolrServerTestBase {@BeforeClasspublic static void beforeTest() throws Exception {+ solrClientTestRule.startSolr(Path.of(SolrTestCaseJ4.TEST_HOME()));+useRootSchema = random().nextBoolean();// schema15.xml declares _root_ field, while schema-rest.xml does not.String schema = useRootSchema ? "schema15.xml" : "schema-rest.xml";SolrTestCaseJ4.newRandomConfig();-- solrClientTestRule.startSolr(Path.of(SolrTestCaseJ4.TEST_HOME()));+ System.setProperty("solr.test.sys.prop1", "propone"); // TODO yuck; remove+ System.setProperty("solr.test.sys.prop2", "proptwo"); // TODO yuck; removesolrClientTestRule.newCollection()diff --git a/solr/core/src/test/org/apache/solr/update/processor/AbstractAtomicUpdatesMultivalueTestBase.java b/solr/core/src/test/org/apache/solr/update/processor/AbstractAtomicUpdatesMultivalueTestBase.javaindex 9919126dc8c..72370e04d23 100644--- a/solr/core/src/test/org/apache/solr/update/processor/AbstractAtomicUpdatesMultivalueTestBase.java+++ b/solr/core/src/test/org/apache/solr/update/processor/AbstractAtomicUpdatesMultivalueTestBase.java@@ -47,9 +47,12 @@ public abstract class AbstractAtomicUpdatesMultivalueTestBase extends EmbeddedSoprotected static void initWithRequestWriter(RequestWriterSupplier requestWriterSupplier)throws Exception {+ solrClientTestRule.startSolr(Paths.get(SolrTestCaseJ4.TEST_HOME()));+System.setProperty("enable.update.log", "true");SolrTestCaseJ4.newRandomConfig();- solrClientTestRule.startSolr(Paths.get(SolrTestCaseJ4.TEST_HOME()));+ System.setProperty("solr.test.sys.prop1", "propone"); // TODO yuck; remove+ System.setProperty("solr.test.sys.prop2", "proptwo"); // TODO yuck; removesolrClientTestRule.newCollection().withConfigSet("../collection1").create();}