[TEST] don't wait for all cluster info in the explain API, just assert
an upper and lower bound
This commit is contained in:
parent
91917d6e91
commit
38427c1df0
|
@ -284,14 +284,6 @@ public final class ClusterAllocationExplainIT extends ESIntegTestCase {
|
||||||
|
|
||||||
boolean includeYesDecisions = randomBoolean();
|
boolean includeYesDecisions = randomBoolean();
|
||||||
boolean includeDiskInfo = randomBoolean();
|
boolean includeDiskInfo = randomBoolean();
|
||||||
assertBusy(() -> {
|
|
||||||
if (includeDiskInfo) {
|
|
||||||
// wait till all cluster info is ready
|
|
||||||
assertEquals(3, client().admin().cluster().prepareAllocationExplain()
|
|
||||||
.setIndex("idx").setShard(0).setPrimary(true).setIncludeDiskInfo(true).get()
|
|
||||||
.getExplanation().getClusterInfo().getNodeLeastAvailableDiskUsages().size());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
ClusterAllocationExplanation explanation = runExplain(false, includeYesDecisions, includeDiskInfo);
|
ClusterAllocationExplanation explanation = runExplain(false, includeYesDecisions, includeDiskInfo);
|
||||||
|
|
||||||
ShardId shardId = explanation.getShard();
|
ShardId shardId = explanation.getShard();
|
||||||
|
@ -928,14 +920,6 @@ public final class ClusterAllocationExplainIT extends ESIntegTestCase {
|
||||||
|
|
||||||
boolean includeYesDecisions = randomBoolean();
|
boolean includeYesDecisions = randomBoolean();
|
||||||
boolean includeDiskInfo = randomBoolean();
|
boolean includeDiskInfo = randomBoolean();
|
||||||
assertBusy(() -> {
|
|
||||||
if (includeDiskInfo) {
|
|
||||||
// wait till all cluster info is ready
|
|
||||||
assertEquals(3, client().admin().cluster().prepareAllocationExplain()
|
|
||||||
.setIndex("idx").setShard(0).setPrimary(true).setIncludeDiskInfo(true).get()
|
|
||||||
.getExplanation().getClusterInfo().getNodeLeastAvailableDiskUsages().size());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
ClusterAllocationExplanation explanation = runExplain(false, replicaNode().getId(), includeYesDecisions, includeDiskInfo);
|
ClusterAllocationExplanation explanation = runExplain(false, replicaNode().getId(), includeYesDecisions, includeDiskInfo);
|
||||||
|
|
||||||
ShardId shardId = explanation.getShard();
|
ShardId shardId = explanation.getShard();
|
||||||
|
|
Loading…
Reference in New Issue