mirror of https://github.com/apache/lucene.git
SOLR-11990: Set waitForFinalState=true for the move replica API call so that the cluster is at steady state when the test ends.
This commit is contained in:
parent
5670d612e3
commit
4d78db26be
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue