You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ma...@apache.org on 2021/10/08 14:55:55 UTC

[solr] branch main updated: SOLR-15656: Crush and pin ZK NIO config for tests. (#337)

This is an automated email from the ASF dual-hosted git repository.

markrmiller pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new 0298111  SOLR-15656: Crush and pin ZK NIO config for tests. (#337)
0298111 is described below

commit 0298111971cb470c519c357f8ea40989896e261b
Author: Mark Robert Miller <ma...@gmail.com>
AuthorDate: Fri Oct 8 09:55:52 2021 -0500

    SOLR-15656: Crush and pin ZK NIO config for tests. (#337)
---
 .../core/src/test/org/apache/solr/cloud/TestConfigSetsAPI.java |  2 +-
 solr/test-framework/src/java/org/apache/solr/SolrTestCase.java | 10 +++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPI.java b/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPI.java
index 532b2fd..7691c6b 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPI.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPI.java
@@ -1237,7 +1237,7 @@ public class TestConfigSetsAPI extends SolrCloudTestCase {
    * {@link ExternalPaths#DEFAULT_CONFIGSET}
    *
    * @see SolrDispatchFilter#SOLR_DEFAULT_CONFDIR_ATTRIBUTE
-   * @see #setDefaultConfigDirSysPropIfNotSet
+   * @see #beforeSolrTestCase
    * @see ConfigSetService#getDefaultConfigDirPath
    */
   @Test
diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java b/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
index d0e754a..d9101e6 100644
--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
@@ -92,7 +92,7 @@ public class SolrTestCase extends LuceneTestCase {
    * @see SolrDispatchFilter#SOLR_DEFAULT_CONFDIR_ATTRIBUTE
    */
   @BeforeClass
-  public static void setDefaultConfigDirSysPropIfNotSet() {
+  public static void beforeSolrTestCase() {
     final String existingValue = System.getProperty(SolrDispatchFilter.SOLR_DEFAULT_CONFDIR_ATTRIBUTE);
     if (null != existingValue) {
       log.info("Test env includes configset dir system property '{}'='{}'", SolrDispatchFilter.SOLR_DEFAULT_CONFDIR_ATTRIBUTE, existingValue);
@@ -110,6 +110,14 @@ public class SolrTestCase extends LuceneTestCase {
                "for tests to run properly",
                SolrDispatchFilter.SOLR_DEFAULT_CONFDIR_ATTRIBUTE, ExternalPaths.DEFAULT_CONFIGSET);
     }
+
+    if (!TEST_NIGHTLY) {
+      System.setProperty("zookeeper.nio.numSelectorThreads", "2");
+      System.setProperty("zookeeper.nio.numWorkerThreads", "3");
+      System.setProperty("zookeeper.commitProcessor.numWorkerThreads", "2");
+      System.setProperty("zookeeper.forceSync", "no");
+      System.setProperty("zookeeper.nio.shutdownTimeout", "100");
+    }
   }
   
   /**