Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-5596: Set system property zookeeper.forceSync=no for Solr test cases

Shalin Shekhar Mangar0f8e3fd9731e
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 02fb5baa3fb..8f23890e5de 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -184,6 +184,8 @@ Other Changes
* SOLR-6171: Remove unused SolrCores coreNameToOrig map (Alan Woodward)
+* SOLR-5596: Set system property zookeeper.forceSync=no for Solr test cases. (shalin)
+
================== 4.9.0 ==================
Versions of Major Components
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 e7d399af4e7..ab875462117 100644
--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
@@ -155,7 +155,8 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase {
initCoreDataDir = createTempDir("init-core-data");
System.err.println("Creating dataDir: " + initCoreDataDir.getAbsolutePath());
-
+
+ System.setProperty("zookeeper.forceSync", "no");
System.setProperty("jetty.testMode", "true");
System.setProperty("enable.update.log", usually() ? "true" : "false");
System.setProperty("tests.shardhandler.randomSeed", Long.toString(random().nextLong()));
@@ -187,6 +188,7 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase {
coreName = ConfigSolrXmlOld.DEFAULT_DEFAULT_CORE_NAME;
} finally {
initCoreDataDir = null;
+ System.clearProperty("zookeeper.forceSync");
System.clearProperty("jetty.testMode");
System.clearProperty("tests.shardhandler.randomSeed");
System.clearProperty("enable.update.log");