You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2020/11/11 14:25:21 UTC

[lucene-solr] 02/02: @1162 Tweak up.

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

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

commit 60108782c79d33ea34a551ca5eb4b6c043c3ce3a
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Wed Nov 11 08:19:36 2020 -0600

    @1162 Tweak up.
---
 solr/core/src/test/org/apache/solr/cloud/ShardRoutingTest.java      | 1 -
 .../test/org/apache/solr/handler/component/SearchHandlerTest.java   | 2 ++
 .../src/java/org/apache/solr/common/cloud/ConnectionManager.java    | 6 ++++++
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/solr/core/src/test/org/apache/solr/cloud/ShardRoutingTest.java b/solr/core/src/test/org/apache/solr/cloud/ShardRoutingTest.java
index d15c87e..98ea7cb 100644
--- a/solr/core/src/test/org/apache/solr/cloud/ShardRoutingTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/ShardRoutingTest.java
@@ -109,7 +109,6 @@ public class ShardRoutingTest extends SolrCloudBridgeTestCase {
   @Test
   public void doHashingTest() throws Exception {
     log.info("### STARTING doHashingTest");
-    cloudClient.getZkStateReader().forciblyRefreshAllClusterStateSlow();
     assertEquals(4, cloudClient.getZkStateReader().getClusterState().getCollection(DEFAULT_COLLECTION).getSlices().size());
     String shardKeys = ShardParams._ROUTE_;
     // for now,  we know how ranges will be distributed to shards.
diff --git a/solr/core/src/test/org/apache/solr/handler/component/SearchHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/component/SearchHandlerTest.java
index 86892e8..c6d32a6 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/SearchHandlerTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/SearchHandlerTest.java
@@ -121,6 +121,7 @@ public class SearchHandlerTest extends SolrTestCaseJ4
   }
   
   @Test
+  @Nightly
   public void testZkConnected() throws Exception{
     MiniSolrCloudCluster miniCluster = new MiniSolrCloudCluster(5, createTempDir(), buildJettyConfig("/solr"));
 
@@ -164,6 +165,7 @@ public class SearchHandlerTest extends SolrTestCaseJ4
   }
 
   @Test
+  @Nightly
   public void testRequireZkConnected() throws Exception{
     MiniSolrCloudCluster miniCluster = new MiniSolrCloudCluster(5, createTempDir(), buildJettyConfig("/solr"));
 
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java
index 4df91aa..c42b9f7 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java
@@ -369,6 +369,7 @@ public class ConnectionManager implements Watcher, Closeable {
     client.zkCallbackExecutor.shutdown();
     client.zkConnManagerCallbackExecutor.shutdown();
     if (keeper != null) {
+      keeper.register(new NullWatcher());
       keeper.close();
     }
 
@@ -450,5 +451,10 @@ public class ConnectionManager implements Watcher, Closeable {
     void connected();
   }
 
+  private static class NullWatcher implements Watcher {
+    @Override
+    public void process(WatchedEvent event) {
 
+    }
+  }
 }