mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
[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 {
|
private void checkNoValidShardCopy(String indexName, ShardId shardId) throws Exception {
|
||||||
final ClusterAllocationExplanation explanation =
|
assertBusy(() -> {
|
||||||
client().admin().cluster().prepareAllocationExplain()
|
final ClusterAllocationExplanation explanation =
|
||||||
.setIndex(indexName).setShard(shardId.id()).setPrimary(true)
|
client().admin().cluster().prepareAllocationExplain()
|
||||||
.get().getExplanation();
|
.setIndex(indexName).setShard(shardId.id()).setPrimary(true)
|
||||||
|
.get().getExplanation();
|
||||||
|
|
||||||
final ShardAllocationDecision shardAllocationDecision = explanation.getShardAllocationDecision();
|
final ShardAllocationDecision shardAllocationDecision = explanation.getShardAllocationDecision();
|
||||||
assertThat(shardAllocationDecision.isDecisionTaken(), equalTo(true));
|
assertThat(shardAllocationDecision.isDecisionTaken(), equalTo(true));
|
||||||
assertThat(shardAllocationDecision.getAllocateDecision().getAllocationDecision(),
|
assertThat(shardAllocationDecision.getAllocateDecision().getAllocationDecision(),
|
||||||
equalTo(AllocationDecision.NO_VALID_SHARD_COPY));
|
equalTo(AllocationDecision.NO_VALID_SHARD_COPY));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user