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 2021/03/10 01:27:56 UTC

[lucene-solr] branch reference_impl_dev updated: @1438 Small tweaks for mocky tests.

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


The following commit(s) were added to refs/heads/reference_impl_dev by this push:
     new 013a61b  @1438 Small tweaks for mocky tests.
013a61b is described below

commit 013a61b49d7d5baabb5f513af3bee9ae83197a49
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Tue Mar 9 19:27:20 2021 -0600

    @1438 Small tweaks for mocky tests.
    
    Took 25 minutes
---
 solr/core/src/java/org/apache/solr/cloud/Overseer.java       | 12 ++++++------
 .../core/src/test/org/apache/solr/cloud/NodeMutatorTest.java |  1 -
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/cloud/Overseer.java b/solr/core/src/java/org/apache/solr/cloud/Overseer.java
index b57013e..4ce3f6c 100644
--- a/solr/core/src/java/org/apache/solr/cloud/Overseer.java
+++ b/solr/core/src/java/org/apache/solr/cloud/Overseer.java
@@ -327,7 +327,7 @@ public class Overseer implements SolrCloseable {
     //systemCollectionCompatCheck(new StringBiConsumer());
     this.zkStateWriter.init();
 
-    queueWatcher = new WorkQueueWatcher(getCoreContainer());
+    queueWatcher = new WorkQueueWatcher(getCoreContainer(), this);
     collectionQueueWatcher = new WorkQueueWatcher.CollectionWorkQueueWatcher(getCoreContainer(), id, overseerLbClient, adminPath, stats, Overseer.this);
     try {
       queueWatcher.start();
@@ -723,10 +723,10 @@ public class Overseer implements SolrCloseable {
     protected volatile boolean closed;
     protected final ReentrantLock ourLock = new ReentrantLock(true);
 
-    public QueueWatcher(CoreContainer cc, String path) throws KeeperException {
+    public QueueWatcher(CoreContainer cc, Overseer overseer, String path) throws KeeperException {
       this.cc = cc;
       this.zkController = cc.getZkController();
-      this.overseer = zkController.getOverseer();
+      this.overseer = overseer;
       this.path = path;
     }
 
@@ -802,8 +802,8 @@ public class Overseer implements SolrCloseable {
 
   private static class WorkQueueWatcher extends QueueWatcher {
 
-    public WorkQueueWatcher(CoreContainer cc) throws KeeperException {
-      super(cc, Overseer.OVERSEER_QUEUE);
+    public WorkQueueWatcher(CoreContainer cc, Overseer overseer) throws KeeperException {
+      super(cc, overseer, Overseer.OVERSEER_QUEUE);
     }
 
 
@@ -866,7 +866,7 @@ public class Overseer implements SolrCloseable {
       private final DistributedMap completedMap;
 
       public CollectionWorkQueueWatcher(CoreContainer cc, String myId, LBHttp2SolrClient overseerLbClient, String adminPath, Stats stats, Overseer overseer) throws KeeperException {
-        super(cc, Overseer.OVERSEER_COLLECTION_QUEUE_WORK);
+        super(cc, overseer, Overseer.OVERSEER_COLLECTION_QUEUE_WORK);
         collMessageHandler = new OverseerCollectionMessageHandler(cc, myId, overseerLbClient, adminPath, stats, overseer);
         configMessageHandler = new OverseerConfigSetMessageHandler(cc);
         failureMap = Overseer.getFailureMap(cc.getZkController().getZkClient());
diff --git a/solr/core/src/test/org/apache/solr/cloud/NodeMutatorTest.java b/solr/core/src/test/org/apache/solr/cloud/NodeMutatorTest.java
index 3b2d74d..ef82155 100644
--- a/solr/core/src/test/org/apache/solr/cloud/NodeMutatorTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/NodeMutatorTest.java
@@ -17,7 +17,6 @@
 package org.apache.solr.cloud;
 
 import org.apache.solr.SolrTestCaseJ4;
-import org.apache.solr.SolrTestCaseJ4Test;
 import org.apache.solr.cloud.overseer.NodeMutator;
 import org.apache.solr.common.cloud.ClusterState;
 import org.apache.solr.common.cloud.ZkStateReader;