Skip to content

Commit 219337d

Browse files
authored
Fix RestoreInProgressAllocationDeciderTests (#135593)
1 parent 9afd217 commit 219337d

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -579,9 +579,6 @@ tests:
579579
- class: org.elasticsearch.xpack.esql.qa.single_node.EsqlSpecIT
580580
method: test {csv-spec:spatial_shapes.ConvertCartesianShapeFromStringParseError}
581581
issue: https://github.com/elastic/elasticsearch/issues/135455
582-
- class: org.elasticsearch.cluster.routing.allocation.decider.RestoreInProgressAllocationDeciderTests
583-
method: testCanAllocatePrimaryExistingInRestoreInProgress
584-
issue: https://github.com/elastic/elasticsearch/issues/135566
585582
- class: org.elasticsearch.xpack.esql.inference.textembedding.TextEmbeddingOperatorTests
586583
method: testSimpleCircuitBreaking
587584
issue: https://github.com/elastic/elasticsearch/issues/135569

server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/RestoreInProgressAllocationDeciderTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public void testCanAllocatePrimaryExistingInRestoreInProgress() {
114114
UnassignedInfo.Reason reason;
115115
if (randomBoolean()) {
116116
failureCount = randomBoolean() ? 0 : 1;
117-
reason = UnassignedInfo.Reason.ALLOCATION_FAILED;
117+
reason = failureCount > 0 ? UnassignedInfo.Reason.ALLOCATION_FAILED : UnassignedInfo.Reason.NEW_INDEX_RESTORED;
118118
} else {
119119
failureCount = 0;
120120
reason = currentInfo.reason();

0 commit comments

Comments
 (0)