lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From no...@apache.org
Subject lucene-solr:jira/solr-11285: create a new instance everytime
Date Wed, 20 Sep 2017 14:46:38 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/jira/solr-11285 2539f021b -> 98a595524


create a new instance everytime


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/98a59552
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/98a59552
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/98a59552

Branch: refs/heads/jira/solr-11285
Commit: 98a59552478cf3a155b9fb2071607ae7d9f3acac
Parents: 2539f02
Author: Noble Paul <noble@apache.org>
Authored: Thu Sep 21 00:15:50 2017 +0930
Committer: Noble Paul <noble@apache.org>
Committed: Thu Sep 21 00:15:50 2017 +0930

----------------------------------------------------------------------
 solr/core/src/test/org/apache/solr/cloud/OverseerTest.java | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/98a59552/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java b/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
index 550b012..21e7d85 100644
--- a/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
@@ -1207,12 +1207,15 @@ public class OverseerTest extends SolrTestCaseJ4 {
     when(zkController.getCoreContainer()).thenReturn(mockAlwaysUpCoreContainer);
     when(zkController.getZkClient()).thenReturn(zkClient);
     when(zkController.getZkStateReader()).thenReturn(reader);
+    when(zkController.getSolrCloudDataProvider()).thenReturn(getCloudDataProvider(zkClient,reader));
+    return zkController;
+  }
+
+  private SolrCloudDataProvider getCloudDataProvider(SolrZkClient zkClient, ZkStateReader
reader) {
     CloudSolrClient client = new CloudSolrClient.Builder()
         .withClusterStateProvider(new ZkClientClusterStateProvider(reader))
         .build();
-    SolrCloudDataProvider dataProvider = new SolrClientCloudDataProvider(new ZkDistributedQueueFactory(zkClient),
client);
-    when(zkController.getSolrCloudDataProvider()).thenReturn(dataProvider);
-    return zkController;
+    return new SolrClientCloudDataProvider(new ZkDistributedQueueFactory(zkClient), client);
   }
 
   @Test


Mime
View raw message