SOLR-12801: Wait for collections properly.

This commit is contained in:
markrmiller 2018-12-01 00:10:09 -06:00 committed by markrmiller
parent a3ec5b5fdf
commit 7f88bfa112
1 changed files with 2 additions and 2 deletions

View File

@ -86,6 +86,7 @@ public class AutoscalingHistoryHandlerTest extends SolrCloudTestCase {
CollectionAdminRequest.createCollection(CollectionAdminParams.SYSTEM_COLL, null, 1, 1) CollectionAdminRequest.createCollection(CollectionAdminParams.SYSTEM_COLL, null, 1, 1)
.setCreateNodeSet(systemCollNode) .setCreateNodeSet(systemCollNode)
.process(solrClient); .process(solrClient);
cluster.waitForActiveCollection(CollectionAdminParams.SYSTEM_COLL, 1, 1);
Set<String> otherNodes = cluster.getJettySolrRunners().stream().map(JettySolrRunner::getNodeName) Set<String> otherNodes = cluster.getJettySolrRunners().stream().map(JettySolrRunner::getNodeName)
.collect(Collectors.toSet()); .collect(Collectors.toSet());
otherNodes.remove(systemCollNode); otherNodes.remove(systemCollNode);
@ -93,8 +94,7 @@ public class AutoscalingHistoryHandlerTest extends SolrCloudTestCase {
.setCreateNodeSet(String.join(",", otherNodes)) .setCreateNodeSet(String.join(",", otherNodes))
.setMaxShardsPerNode(3) .setMaxShardsPerNode(3)
.process(solrClient); .process(solrClient);
waitForRecovery(CollectionAdminParams.SYSTEM_COLL); cluster.waitForActiveCollection(COLL_NAME, 1, 3);
waitForRecovery(COLL_NAME);
} }
public static class TesterListener extends TriggerListenerBase { public static class TesterListener extends TriggerListenerBase {