[CI] AllocationIdIT testFailedRecoveryOnAllocateStalePrimaryRequiresAnotherAllocateStalePrimary failure
Closes #35504
This commit is contained in:
parent
bc799e4a6f
commit
9728119b82
|
@ -224,15 +224,17 @@ public class AllocationIdIT extends ESIntegTestCase {
|
|||
}
|
||||
|
||||
private void checkNoValidShardCopy(String indexName, ShardId shardId) throws Exception {
|
||||
final ClusterAllocationExplanation explanation =
|
||||
client().admin().cluster().prepareAllocationExplain()
|
||||
.setIndex(indexName).setShard(shardId.id()).setPrimary(true)
|
||||
.get().getExplanation();
|
||||
assertBusy(() -> {
|
||||
final ClusterAllocationExplanation explanation =
|
||||
client().admin().cluster().prepareAllocationExplain()
|
||||
.setIndex(indexName).setShard(shardId.id()).setPrimary(true)
|
||||
.get().getExplanation();
|
||||
|
||||
final ShardAllocationDecision shardAllocationDecision = explanation.getShardAllocationDecision();
|
||||
assertThat(shardAllocationDecision.isDecisionTaken(), equalTo(true));
|
||||
assertThat(shardAllocationDecision.getAllocateDecision().getAllocationDecision(),
|
||||
equalTo(AllocationDecision.NO_VALID_SHARD_COPY));
|
||||
final ShardAllocationDecision shardAllocationDecision = explanation.getShardAllocationDecision();
|
||||
assertThat(shardAllocationDecision.isDecisionTaken(), equalTo(true));
|
||||
assertThat(shardAllocationDecision.getAllocateDecision().getAllocationDecision(),
|
||||
equalTo(AllocationDecision.NO_VALID_SHARD_COPY));
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue