Skip to content

Commit

Permalink
SOLR-16573: Fix tests RE solr.test.sys.prop1
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmiley committed Feb 8, 2023
1 parent 21bc46c commit cada03b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions solr/core/src/test/org/apache/solr/update/RootFieldTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit cada03b

Please sign in to comment.