diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-analytics-query.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-analytics-query.xml
index 455f1987cf2..1012b14a0c8 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-analytics-query.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-analytics-query.xml
@@ -217,10 +217,6 @@
-
- prefix-${solr.test.sys.prop2}-suffix
-
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml
index b655c9355da..b346eb08db0 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml
@@ -220,10 +220,6 @@
-
- prefix-${solr.test.sys.prop2}-suffix
-
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-elevate.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-elevate.xml
index 63bb8f84ffa..7e71e3c76ae 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-elevate.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-elevate.xml
@@ -120,10 +120,6 @@
-
- prefix-${solr.test.sys.prop2}-suffix
-
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-minhash.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-minhash.xml
index abd50a7cbf0..8d6e8e842b8 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-minhash.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-minhash.xml
@@ -434,10 +434,6 @@
-
- prefix-${solr.test.sys.prop2}-suffix
-
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml
index c7e160d8980..f543311b856 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml
@@ -430,10 +430,6 @@
-
- prefix-${solr.test.sys.prop2}-suffix
-
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-test-misc.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-test-misc.xml
index cbfe9752574..f26744ad177 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-test-misc.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-test-misc.xml
@@ -28,14 +28,8 @@
-
- prefix-${solr.test.sys.prop2}-suffix
-
-
-
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-test-properties.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-test-properties.xml
new file mode 100644
index 00000000000..2a095e0b02a
--- /dev/null
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-test-properties.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+ ${tests.luceneMatchVersion:LATEST}
+ ${solr.data.dir:}
+
+
+
+
+
+ prefix-${solr.test.sys.prop2}-suffix
+
+
+
\ No newline at end of file
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml
index 30764a94377..9efa5d4a29c 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml
@@ -467,10 +467,6 @@
-
- prefix-${solr.test.sys.prop2}-suffix
-
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestRequestForwarding.java b/solr/core/src/test/org/apache/solr/cloud/TestRequestForwarding.java
index c672da3f4f2..1bb0816aa34 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestRequestForwarding.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestRequestForwarding.java
@@ -35,8 +35,6 @@ public class TestRequestForwarding extends SolrTestCaseJ4 {
@Override
public void setUp() throws Exception {
super.setUp();
- System.setProperty("solr.test.sys.prop1", "propone");
- System.setProperty("solr.test.sys.prop2", "proptwo");
solrCluster = new MiniSolrCloudCluster(3, createTempDir(), JettyConfig.builder().build());
solrCluster.uploadConfigSet(TEST_PATH().resolve("collection1/conf"), "conf1");
}
@@ -44,9 +42,6 @@ public void setUp() throws Exception {
@Override
public void tearDown() throws Exception {
solrCluster.shutdown();
- System.clearProperty("solr.test.sys.prop1");
- System.clearProperty("solr.test.sys.prop2");
-
super.tearDown();
}
diff --git a/solr/core/src/test/org/apache/solr/core/TestConfig.java b/solr/core/src/test/org/apache/solr/core/TestConfig.java
index 745fa21c4c5..a785b3c731b 100644
--- a/solr/core/src/test/org/apache/solr/core/TestConfig.java
+++ b/solr/core/src/test/org/apache/solr/core/TestConfig.java
@@ -20,13 +20,11 @@
import java.io.InputStream;
import java.util.Collections;
import java.util.LinkedHashMap;
-import java.util.List;
import org.apache.lucene.index.ConcurrentMergeScheduler;
import org.apache.lucene.index.IndexWriterConfig;
import org.apache.lucene.index.TieredMergePolicy;
import org.apache.lucene.util.InfoStream;
import org.apache.solr.SolrTestCaseJ4;
-import org.apache.solr.common.ConfigNode;
import org.apache.solr.schema.IndexSchema;
import org.apache.solr.schema.IndexSchemaFactory;
import org.apache.solr.search.CacheConfig;
@@ -63,30 +61,6 @@ public void testDisableRequetsHandler() {
assertNotNull(h.getCore().getRequestHandler("/enabled"));
}
- @Test
- public void testJavaProperty() {
- // property values defined in build.xml
-
- String s = solrConfig.get("propTest").txt();
- assertEquals("prefix-proptwo-suffix", s);
-
- s = solrConfig.get("propTest").attr("attr1", "default");
- assertEquals("propone-${literal}", s);
-
- s = solrConfig.get("propTest").attr("attr2", "default");
- assertEquals("default-from-config", s);
-
- assertEquals(
- "prefix-proptwo-suffix",
- solrConfig.get("propTest", it -> "default-from-config".equals(it.attr("attr2"))).txt());
-
- List nl = solrConfig.root.getAll("propTest");
- assertEquals(1, nl.size());
- assertEquals("prefix-proptwo-suffix", nl.get(0).txt());
-
- assertEquals("prefix-proptwo-suffix", solrConfig.get("propTest").txt());
- }
-
@Test
public void testCacheEnablingDisabling() throws Exception {
// ensure if cache is not defined in the config then cache is disabled
diff --git a/solr/core/src/test/org/apache/solr/core/TestConfigPropertySubstitution.java b/solr/core/src/test/org/apache/solr/core/TestConfigPropertySubstitution.java
new file mode 100644
index 00000000000..e40c1d09e70
--- /dev/null
+++ b/solr/core/src/test/org/apache/solr/core/TestConfigPropertySubstitution.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.core;
+
+import java.util.List;
+import org.apache.solr.SolrTestCaseJ4;
+import org.apache.solr.common.ConfigNode;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Test class specifically for testing system property substitution in Solr configuration files.
+ * This class is isolated from other tests to minimize the global impact of setting test-specific
+ * system properties.
+ */
+public class TestConfigPropertySubstitution extends SolrTestCaseJ4 {
+
+ @BeforeClass
+ public static void beforeClass() throws Exception {
+ // Set the test properties specifically for property substitution testing
+ System.setProperty("solr.test.sys.prop1", "propone");
+ System.setProperty("solr.test.sys.prop2", "proptwo");
+
+ // Use a minimal configuration file that only contains the propTest element
+ initCore("solrconfig-test-properties.xml", "schema.xml");
+ }
+
+ @Test
+ public void testJavaPropertySubstitution() {
+ // Test that system property substitution works correctly in configuration files
+ // These property values are set in beforeClass()
+
+ String s = solrConfig.get("propTest").txt();
+ assertEquals("prefix-proptwo-suffix", s);
+
+ s = solrConfig.get("propTest").attr("attr1", "default");
+ assertEquals("propone-${literal}", s);
+
+ s = solrConfig.get("propTest").attr("attr2", "default");
+ assertEquals("default-from-config", s);
+
+ assertEquals(
+ "prefix-proptwo-suffix",
+ solrConfig.get("propTest", it -> "default-from-config".equals(it.attr("attr2"))).txt());
+
+ List nl = solrConfig.root.getAll("propTest");
+ assertEquals(1, nl.size());
+ assertEquals("prefix-proptwo-suffix", nl.get(0).txt());
+
+ assertEquals("prefix-proptwo-suffix", solrConfig.get("propTest").txt());
+ }
+}
diff --git a/solr/core/src/test/org/apache/solr/core/TestCorePropertiesReload.java b/solr/core/src/test/org/apache/solr/core/TestCorePropertiesReload.java
index f84a00e45d8..fd0e16b504c 100644
--- a/solr/core/src/test/org/apache/solr/core/TestCorePropertiesReload.java
+++ b/solr/core/src/test/org/apache/solr/core/TestCorePropertiesReload.java
@@ -37,8 +37,6 @@ public static void beforeClass() throws Exception {
solrHomeDirectory = createTempDir();
PathUtils.copyDirectory(TEST_HOME(), solrHomeDirectory);
- System.setProperty("solr.test.sys.prop1", "propone");
- System.setProperty("solr.test.sys.prop2", "proptwo");
Properties props = new Properties();
props.setProperty("test", "Before reload");
writeCustomProperties(props);
diff --git a/solr/core/src/test/org/apache/solr/handler/ReplicationTestHelper.java b/solr/core/src/test/org/apache/solr/handler/ReplicationTestHelper.java
index 0a25972f7ac..a5eace8426d 100644
--- a/solr/core/src/test/org/apache/solr/handler/ReplicationTestHelper.java
+++ b/solr/core/src/test/org/apache/solr/handler/ReplicationTestHelper.java
@@ -292,9 +292,6 @@ public void setTestPort(Integer testPort) {
}
public void setUp() throws Exception {
- System.setProperty("solr.test.sys.prop1", "propone");
- System.setProperty("solr.test.sys.prop2", "proptwo");
-
Properties props = new Properties();
props.setProperty("name", "collection1");
diff --git a/solr/core/src/test/org/apache/solr/metrics/SolrMetricsIntegrationTest.java b/solr/core/src/test/org/apache/solr/metrics/SolrMetricsIntegrationTest.java
index dd599e1f1b4..ecfaf52451a 100644
--- a/solr/core/src/test/org/apache/solr/metrics/SolrMetricsIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/metrics/SolrMetricsIntegrationTest.java
@@ -50,9 +50,6 @@ public class SolrMetricsIntegrationTest extends SolrTestCaseJ4 {
@Before
public void beforeTest() throws Exception {
Path home = TEST_PATH();
- // define these properties, they are used in solrconfig.xml
- System.setProperty("solr.test.sys.prop1", "propone");
- System.setProperty("solr.test.sys.prop2", "proptwo");
String solrXml =
Files.readString(home.resolve("solr-metricreporter.xml"), StandardCharsets.UTF_8);
NodeConfig cfg = SolrXmlConfig.fromString(home, solrXml);
diff --git a/solr/core/src/test/org/apache/solr/rest/SolrRestletTestBase.java b/solr/core/src/test/org/apache/solr/rest/SolrRestletTestBase.java
index 9289b33447e..a6b6f909d2b 100644
--- a/solr/core/src/test/org/apache/solr/rest/SolrRestletTestBase.java
+++ b/solr/core/src/test/org/apache/solr/rest/SolrRestletTestBase.java
@@ -46,9 +46,6 @@ public static void init() throws Exception {
System.setProperty("coreRootDirectory", coresDir.toString());
System.setProperty("configSetBaseDir", TEST_HOME().toString());
- System.setProperty("solr.test.sys.prop1", "propone");
- System.setProperty("solr.test.sys.prop2", "proptwo");
-
final SortedMap extraServlets = new TreeMap<>();
Properties props = new Properties();
diff --git a/solr/core/src/test/org/apache/solr/schema/DateFieldTest.java b/solr/core/src/test/org/apache/solr/schema/DateFieldTest.java
index 3db98117565..fb50c88578f 100644
--- a/solr/core/src/test/org/apache/solr/schema/DateFieldTest.java
+++ b/solr/core/src/test/org/apache/solr/schema/DateFieldTest.java
@@ -32,9 +32,6 @@ public class DateFieldTest extends SolrTestCaseJ4 {
@Override
public void setUp() throws Exception {
super.setUp();
- // set some system properties for use by tests
- System.setProperty("solr.test.sys.prop1", "propone");
- System.setProperty("solr.test.sys.prop2", "proptwo");
SolrConfig config =
new SolrConfig(testInstanceDir, testConfHome.resolve("solrconfig.xml").toString());
IndexSchema schema =
diff --git a/solr/core/src/test/org/apache/solr/schema/PrimitiveFieldTypeTest.java b/solr/core/src/test/org/apache/solr/schema/PrimitiveFieldTypeTest.java
index 5b681d4c9fc..4b5dfc76b99 100644
--- a/solr/core/src/test/org/apache/solr/schema/PrimitiveFieldTypeTest.java
+++ b/solr/core/src/test/org/apache/solr/schema/PrimitiveFieldTypeTest.java
@@ -38,8 +38,6 @@ public void setUp() throws Exception {
// set some system properties for use by tests
System.setProperty(
"solr.index.updatelog.enabled", "false"); // schema12 doesn't support _version_
- System.setProperty("solr.test.sys.prop1", "propone");
- System.setProperty("solr.test.sys.prop2", "proptwo");
initMap = new HashMap<>();
config =
diff --git a/solr/core/src/test/org/apache/solr/search/join/ShardToShardJoinAbstract.java b/solr/core/src/test/org/apache/solr/search/join/ShardToShardJoinAbstract.java
index b2b3f4be01e..5790027afcf 100644
--- a/solr/core/src/test/org/apache/solr/search/join/ShardToShardJoinAbstract.java
+++ b/solr/core/src/test/org/apache/solr/search/join/ShardToShardJoinAbstract.java
@@ -20,7 +20,6 @@
import java.io.IOException;
import java.lang.invoke.MethodHandles;
-import java.nio.file.Path;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Arrays;
@@ -43,7 +42,6 @@
import org.apache.solr.client.solrj.request.beans.PluginMeta;
import org.apache.solr.client.solrj.response.CollectionAdminResponse;
import org.apache.solr.client.solrj.response.QueryResponse;
-import org.apache.solr.cloud.MiniSolrCloudCluster;
import org.apache.solr.cloud.SolrCloudTestCase;
import org.apache.solr.cluster.placement.PlacementPluginFactory;
import org.apache.solr.cluster.placement.plugins.AffinityPlacementConfig;
@@ -52,13 +50,12 @@
import org.apache.solr.common.SolrDocumentList;
import org.apache.solr.common.SolrInputDocument;
import org.junit.AfterClass;
-import org.junit.BeforeClass;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/** Tests using fromIndex that points to a collection in SolrCloud mode. */
// @LogLevel("org.apache.solr.schema.IndexSchema=TRACE")
-public class ShardToShardJoinAbstract extends SolrCloudTestCase {
+public abstract class ShardToShardJoinAbstract extends SolrCloudTestCase {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@@ -68,25 +65,17 @@ public class ShardToShardJoinAbstract extends SolrCloudTestCase {
protected static String toColl = "parent";
protected static String fromColl = "children";
- @BeforeClass
- public static void setPropos() {
- System.setProperty("solr.test.sys.prop1", "propone");
- System.setProperty("solr.test.sys.prop2", "proptwo");
- }
-
public static void setupCluster(
Consumer fromDecorator,
Consumer parentDecorator,
Function parentDocFactory,
BiFunction childDocFactory)
throws Exception {
- final Path configDir = TEST_COLL1_CONF();
String configName = "_default"; // "solrCloudCollectionConfig";
int nodeCount = 5;
- final MiniSolrCloudCluster cloudCluster =
- configureCluster(nodeCount) // .addConfig(configName, configDir)
- .configure();
+
+ configureCluster(nodeCount).configure();
PluginMeta plugin = new PluginMeta();
plugin.name = PlacementPluginFactory.PLUGIN_NAME;
@@ -151,8 +140,6 @@ public static void setupCluster(
@AfterClass
public static void shutdown() {
- System.clearProperty("solr.test.sys.prop1");
- System.clearProperty("solr.test.sys.prop2");
log.info("logic complete ... deleting the {} and {} collections", toColl, fromColl);
// try to clean up
diff --git a/solr/core/src/test/org/apache/solr/search/stats/TestDistribIDF.java b/solr/core/src/test/org/apache/solr/search/stats/TestDistribIDF.java
index 2bcd27d87e4..9a7e758a6a5 100644
--- a/solr/core/src/test/org/apache/solr/search/stats/TestDistribIDF.java
+++ b/solr/core/src/test/org/apache/solr/search/stats/TestDistribIDF.java
@@ -55,9 +55,6 @@ public void setUp() throws Exception {
super.setUp();
solrCluster = new MiniSolrCloudCluster(3, createTempDir(), JettyConfig.builder().build());
- // set some system properties for use by tests
- System.setProperty("solr.test.sys.prop1", "propone");
- System.setProperty("solr.test.sys.prop2", "proptwo");
solrCluster.uploadConfigSet(TEST_PATH().resolve("collection1/conf"), "conf1");
solrCluster.uploadConfigSet(configset("configset-2"), "conf2");
}
@@ -66,8 +63,6 @@ public void setUp() throws Exception {
public void tearDown() throws Exception {
solrCluster.shutdown();
System.clearProperty("solr.statsCache");
- System.clearProperty("solr.test.sys.prop1");
- System.clearProperty("solr.test.sys.prop2");
super.tearDown();
}
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 c553e58322c..1c436829d24 100644
--- a/solr/core/src/test/org/apache/solr/update/RootFieldTest.java
+++ b/solr/core/src/test/org/apache/solr/update/RootFieldTest.java
@@ -56,8 +56,6 @@ public static void beforeTest() throws Exception {
// schema15.xml declares _root_ field, while schema-rest.xml does not.
String schema = useRootSchema ? "schema15.xml" : "schema-rest.xml";
SolrTestCaseJ4.newRandomConfig();
- 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 75cb9b69327..a4bdac64b11 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
@@ -49,8 +49,6 @@ protected static void initWithRequestWriter(RequestWriterSupplier requestWriterS
System.setProperty("solr.index.updatelog.enabled", "true");
SolrTestCaseJ4.newRandomConfig();
- 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();
}
diff --git a/solr/modules/extraction/src/test-files/extraction/solr/collection1/conf/solrconfig.xml b/solr/modules/extraction/src/test-files/extraction/solr/collection1/conf/solrconfig.xml
index 159d5e16162..4ed11e82fe6 100644
--- a/solr/modules/extraction/src/test-files/extraction/solr/collection1/conf/solrconfig.xml
+++ b/solr/modules/extraction/src/test-files/extraction/solr/collection1/conf/solrconfig.xml
@@ -203,8 +203,5 @@
-
- prefix-${solr.test.sys.prop2}-suffix
diff --git a/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java b/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
index 465c771ee2c..726c736fda7 100644
--- a/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
+++ b/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
@@ -257,8 +257,6 @@ public Path getSolrHome() {
public void distribSetUp() throws Exception {
distribSetUpCalled = true;
SolrTestCaseJ4.resetExceptionIgnores(); // ignore anything with ignore_exception in it
- System.setProperty("solr.test.sys.prop1", "propone");
- System.setProperty("solr.test.sys.prop2", "proptwo");
testDir = createTempDir();
}
diff --git a/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java b/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java
index 93e5424c824..a6524e74800 100644
--- a/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java
+++ b/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java
@@ -134,9 +134,6 @@ protected HttpClient getHttpClient() {
// explicitly there as of SOLR-4817
@Deprecated // Instead use a basic config + whatever is needed or default config
protected static void setupJettyTestHome(Path solrHome, String collection) throws Exception {
- // TODO remove these sys props!
- System.setProperty("solr.test.sys.prop1", "propone");
- System.setProperty("solr.test.sys.prop2", "proptwo");
copySolrHomeToTemp(solrHome, collection);
}
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 2036a94ce61..26c21b60007 100644
--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
@@ -704,10 +704,6 @@ public static void initCore() throws Exception {
ignoreException("ignore_exception");
- // other methods like starting a jetty instance need these too
- System.setProperty("solr.test.sys.prop1", "propone");
- System.setProperty("solr.test.sys.prop2", "proptwo");
-
String configFile = getSolrConfigFile();
if (configFile != null) {
createCore();
diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
index 67922db5a42..82bae1ea2f4 100644
--- a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
+++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
@@ -276,10 +276,6 @@ public void distribSetUp() throws Exception {
if (schema == null) schema = "schema.xml";
zkServer.buildZooKeeper(getCloudSolrConfig(), schema);
- // set some system properties for use by tests
- System.setProperty("solr.test.sys.prop1", "propone");
- System.setProperty("solr.test.sys.prop2", "proptwo");
-
// ignoreException(".*");
cloudInit = false;
@@ -2211,8 +2207,6 @@ public void distribTearDown() throws Exception {
System.clearProperty(ENABLE_UPDATE_LOG);
System.clearProperty(REMOVE_VERSION_FIELD);
System.clearProperty("solr.directoryFactory");
- System.clearProperty("solr.test.sys.prop1");
- System.clearProperty("solr.test.sys.prop2");
System.clearProperty(ZOOKEEPER_FORCE_SYNC);
System.clearProperty(
MockDirectoryFactory.SOLR_TESTS_ALLOW_READING_FILES_STILL_OPEN_FOR_WRITE);
diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractZkTestCase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractZkTestCase.java
index 2c423d3f973..43100f63c08 100644
--- a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractZkTestCase.java
+++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractZkTestCase.java
@@ -72,8 +72,6 @@ public static void aztAfterClass() throws Exception {
} finally {
System.clearProperty("zkHost");
- System.clearProperty("solr.test.sys.prop1");
- System.clearProperty("solr.test.sys.prop2");
System.clearProperty("solrcloud.skip.autorecovery");
System.clearProperty("solr.port.listen");
System.clearProperty(ZOOKEEPER_FORCE_SYNC);
diff --git a/solr/test-framework/src/java/org/apache/solr/util/TestHarness.java b/solr/test-framework/src/java/org/apache/solr/util/TestHarness.java
index c363a1e635d..29caa318a04 100644
--- a/solr/test-framework/src/java/org/apache/solr/util/TestHarness.java
+++ b/solr/test-framework/src/java/org/apache/solr/util/TestHarness.java
@@ -67,9 +67,6 @@ public class TestHarness extends BaseTestHarness {
* ${solrHome}/${coreName}/conf/${confFile}
*/
public static SolrConfig createConfig(Path solrHome, String coreName, String confFile) {
- // set some system properties for use by tests
- System.setProperty("solr.test.sys.prop1", "propone");
- System.setProperty("solr.test.sys.prop2", "proptwo");
try {
return new SolrConfig(solrHome.resolve(coreName), confFile);
} catch (Exception xany) {
diff --git a/solr/test-framework/src/test-files/solr/collection1/conf/solrconfig.xml b/solr/test-framework/src/test-files/solr/collection1/conf/solrconfig.xml
index 4338f0cf40a..a91253e1b0b 100644
--- a/solr/test-framework/src/test-files/solr/collection1/conf/solrconfig.xml
+++ b/solr/test-framework/src/test-files/solr/collection1/conf/solrconfig.xml
@@ -452,10 +452,6 @@
-
- prefix-${solr.test.sys.prop2}-suffix
-