You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2018/08/31 04:12:45 UTC

lucene-solr:branch_7x: SOLR-11990: Set waitForFinalState=true for the move replica API call so that the cluster is at steady state when the test ends.

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x cc5fdbf38 -> 5b23a375e


SOLR-11990: Set waitForFinalState=true for the move replica API call so that the cluster is at steady state when the test ends.

(cherry picked from commit 4d78db26be21727fa29b0c055f24e0bac625e017)


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

Branch: refs/heads/branch_7x
Commit: 5b23a375e30f156ae1fe4f35377d922a6fded091
Parents: cc5fdbf
Author: Shalin Shekhar Mangar <sh...@apache.org>
Authored: Fri Aug 31 09:42:00 2018 +0530
Committer: Shalin Shekhar Mangar <sh...@apache.org>
Committed: Fri Aug 31 09:42:39 2018 +0530

----------------------------------------------------------------------
 .../core/src/test/org/apache/solr/cloud/TestWithCollection.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5b23a375/solr/core/src/test/org/apache/solr/cloud/TestWithCollection.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestWithCollection.java b/solr/core/src/test/org/apache/solr/cloud/TestWithCollection.java
index 1ed985a..208b869 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestWithCollection.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestWithCollection.java
@@ -336,8 +336,9 @@ public class TestWithCollection extends SolrCloudTestCase {
     assertNull(collection.getReplicas(otherNode)); // sanity check
     assertNull(withCollection.getReplicas(otherNode)); // sanity check
 
-    new CollectionAdminRequest.MoveReplica(xyz, collection.getReplicas().iterator().next().getName(), otherNode)
-        .process(solrClient);
+    CollectionAdminRequest.MoveReplica moveReplica = new CollectionAdminRequest.MoveReplica(xyz, collection.getReplicas().iterator().next().getName(), otherNode);
+    moveReplica.setWaitForFinalState(true);
+    moveReplica.process(solrClient);
 //    zkClient().printLayoutToStdOut();
     collection = solrClient.getZkStateReader().getClusterState().getCollection(xyz); // refresh
     DocCollection withCollectionRefreshed = solrClient.getZkStateReader().getClusterState().getCollection(abc); // refresh