Skip to content

Apache Lucene open-source search software

SOLR-9849: Use a very low value for solr.cloud.wait-for-updates-with-stale-state-pause in tests.

markrmillerb28dc3fe346a
diff --git a/solr/core/src/test/org/apache/solr/cloud/RecoveryAfterSoftCommitTest.java b/solr/core/src/test/org/apache/solr/cloud/RecoveryAfterSoftCommitTest.java
index ba407589005..c987c90571e 100644
--- a/solr/core/src/test/org/apache/solr/cloud/RecoveryAfterSoftCommitTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/RecoveryAfterSoftCommitTest.java
@@ -43,8 +43,6 @@ public class RecoveryAfterSoftCommitTest extends AbstractFullDistribZkTestBase {
public static void beforeTests() {
System.setProperty("solr.tests.maxBufferedDocs", String.valueOf(MAX_BUFFERED_DOCS));
System.setProperty("solr.ulog.numRecordsToKeep", String.valueOf(ULOG_NUM_RECORDS_TO_KEEP));
- // the default=7000ms artificially slows down recovery and is not needed for this test
- System.setProperty("solr.cloud.wait-for-updates-with-stale-state-pause", "500");
// avoid creating too many files, see SOLR-7421
System.setProperty("useCompoundFile", "true");
}
@@ -53,7 +51,6 @@ public class RecoveryAfterSoftCommitTest extends AbstractFullDistribZkTestBase {
public static void afterTest() {
System.clearProperty("solr.tests.maxBufferedDocs");
System.clearProperty("solr.ulog.numRecordsToKeep");
- System.clearProperty("solr.cloud.wait-for-updates-with-stale-state-pause");
System.clearProperty("useCompoundFile");
}
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 c9b25a822df..7d9d1f6a8f5 100644
--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
@@ -274,6 +274,7 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase {
System.setProperty("tests.shardhandler.randomSeed", Long.toString(random().nextLong()));
System.setProperty("solr.clustering.enabled", "false");
System.setProperty("solr.peerSync.useRangeVersions", String.valueOf(random().nextBoolean()));
+ System.setProperty("solr.cloud.wait-for-updates-with-stale-state-pause", "500");
startTrackingSearchers();
ignoreException("ignore_exception");
newRandomConfig();
@@ -322,7 +323,7 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase {
System.clearProperty("useCompoundFile");
System.clearProperty("urlScheme");
System.clearProperty("solr.peerSync.useRangeVersions");
-
+ System.clearProperty("solr.cloud.wait-for-updates-with-stale-state-pause");
HttpClientUtil.resetHttpClientBuilder();
// clean up static