lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [20/45] lucene-solr:jira/solr-11285-sim: use doReturn instead of thenReturn
Date Wed, 04 Oct 2017 14:43:16 GMT
use doReturn instead of thenReturn


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

Branch: refs/heads/jira/solr-11285-sim
Commit: 9b63158bd4375a99280155f84556970d96c1d800
Parents: 98a5955
Author: Noble Paul <noble@apache.org>
Authored: Thu Sep 21 17:57:09 2017 +0930
Committer: Noble Paul <noble@apache.org>
Committed: Thu Sep 21 17:57:09 2017 +0930

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


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9b63158b/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 21e7d85..101ac60 100644
--- a/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
@@ -74,6 +74,7 @@ import org.slf4j.LoggerFactory;
 import org.xml.sax.SAXException;
 
 import static org.apache.solr.cloud.AbstractDistribZkTestBase.verifyReplicaStatus;
+import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
@@ -1207,7 +1208,8 @@ 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));
+    doReturn(getCloudDataProvider(zkClient,reader))
+        .when(zkController).getSolrCloudDataProvider();
     return zkController;
   }
 


Mime
View raw message