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