mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-01 00:19:11 +00:00
[TEST] Wait for nodes before calling the API stats API
This commit is contained in:
parent
2083ca0aa3
commit
d2e19ea665
@ -64,13 +64,13 @@ public class ClusterStatsTests extends ElasticsearchIntegrationTest {
|
||||
assertCounts(response.getNodesStats().getCounts(), 2, 1, 0, 1, 0);
|
||||
|
||||
internalCluster().startNode(ImmutableSettings.builder().put("node.master", false));
|
||||
response = client().admin().cluster().prepareClusterStats().get();
|
||||
waitForNodes(3);
|
||||
response = client().admin().cluster().prepareClusterStats().get();
|
||||
assertCounts(response.getNodesStats().getCounts(), 3, 1, 1, 1, 0);
|
||||
|
||||
internalCluster().startNode(ImmutableSettings.builder().put("node.client", true));
|
||||
response = client().admin().cluster().prepareClusterStats().get();
|
||||
waitForNodes(4);
|
||||
response = client().admin().cluster().prepareClusterStats().get();
|
||||
assertCounts(response.getNodesStats().getCounts(), 4, 1, 1, 1, 1);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user