[CI] AllocationIdIT testFailedRecoveryOnAllocateStalePrimaryRequiresAnotherAllocateStalePrimary failure
Closes
@@ -224,6 +224,7 @@ public class AllocationIdIT extends ESIntegTestCase {
}
private void checkNoValidShardCopy(String indexName, ShardId shardId) throws Exception {
+ assertBusy(() -> {
final ClusterAllocationExplanation explanation =
client().admin().cluster().prepareAllocationExplain()
.setIndex(indexName).setShard(shardId.id()).setPrimary(true)
@@ -233,6 +234,7 @@ public class AllocationIdIT extends ESIntegTestCase {
assertThat(shardAllocationDecision.isDecisionTaken(), equalTo(true));
assertThat(shardAllocationDecision.getAllocateDecision().getAllocationDecision(),
equalTo(AllocationDecision.NO_VALID_SHARD_COPY));
+ });
}
}
