mirror of https://github.com/apache/lucene.git
SOLR-12801: Wait for collections properly.
This commit is contained in:
parent
a3ec5b5fdf
commit
7f88bfa112
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue