From cada03b20e4cfe36c64a68f8a5d3a0c0af99d9bc Mon Sep 17 00:00:00 2001 From: David Smiley Date: Wed, 8 Feb 2023 00:32:18 -0500 Subject: [PATCH] SOLR-16573: Fix tests RE solr.test.sys.prop1 --- .../core/src/test/org/apache/solr/update/RootFieldTest.java | 6 ++++-- .../processor/AbstractAtomicUpdatesMultivalueTestBase.java | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/solr/core/src/test/org/apache/solr/update/RootFieldTest.java b/solr/core/src/test/org/apache/solr/update/RootFieldTest.java index 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 @@ private static boolean expectRoot() { @BeforeClass public 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; remove solrClientTestRule .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.java index 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 EmbeddedSo protected 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; remove solrClientTestRule.newCollection().withConfigSet("../collection1").create(); }