Skip to content

Commit 5f13de8

Browse files
authored
Fix testClearCache (#70004)
Closes #69914
1 parent 8d09fbf commit 5f13de8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

x-pack/plugin/searchable-snapshots/src/test/java/org/elasticsearch/index/store/SearchableSnapshotDirectoryTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,6 @@ private void testIndexInputs(final CheckedBiConsumer<IndexInput, IndexInput, Exc
650650
});
651651
}
652652

653-
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/69914")
654653
public void testClearCache() throws Exception {
655654
try (CacheService cacheService = defaultCacheService()) {
656655
cacheService.start();
@@ -728,7 +727,8 @@ public void testClearCache() throws Exception {
728727

729728
try (IndexInput input = directory.openInput(fileInfo.physicalName(), randomIOContext())) {
730729
assertThat(input.length(), equalTo((long) fileLength));
731-
final int start = between(0, fileLength - 1);
730+
// we can't just read footer as that is not served from cache
731+
final int start = between(0, fileLength - CodecUtil.footerLength() - 1);
732732
final int end = between(start + 1, fileLength);
733733

734734
input.seek(start);

0 commit comments

Comments
 (0)