Skip to content

Commit 187935e

Browse files
authored
Fix OldRepositoryAccessIT testOldRepoAccess (#117649)
This test started failing with the changes made in #115314 when we only have one shard in the index. This change adjusts test expectations. Closes #115631
1 parent 9d9a136 commit 187935e

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,6 @@ tests:
9191
- class: org.elasticsearch.xpack.restart.MLModelDeploymentFullClusterRestartIT
9292
method: testDeploymentSurvivesRestart {cluster=UPGRADED}
9393
issue: https://github.com/elastic/elasticsearch/issues/115528
94-
- class: org.elasticsearch.oldrepos.OldRepositoryAccessIT
95-
method: testOldRepoAccess
96-
issue: https://github.com/elastic/elasticsearch/issues/115631
9794
- class: org.elasticsearch.action.update.UpdateResponseTests
9895
method: testToAndFromXContent
9996
issue: https://github.com/elastic/elasticsearch/issues/115689

x-pack/qa/repository-old-versions/src/test/java/org/elasticsearch/oldrepos/OldRepositoryAccessIT.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,8 @@ private void assertDocs(
484484
logger.info(searchResponse);
485485
assertEquals(0, searchResponse.getHits().getTotalHits().value());
486486
assertEquals(numberOfShards, searchResponse.getSuccessfulShards());
487-
assertEquals(numberOfShards, searchResponse.getSkippedShards());
487+
int expectedSkips = numberOfShards == 1 ? 0 : numberOfShards;
488+
assertEquals(expectedSkips, searchResponse.getSkippedShards());
488489
} finally {
489490
searchResponse.decRef();
490491
}

0 commit comments

Comments
 (0)