Skip to content

Commit 11fae67

Browse files
committed
Fix testClearCache (#70004)
Closes #69914
1 parent 62e26cf commit 11fae67

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
@@ -651,7 +651,6 @@ private void testIndexInputs(final CheckedBiConsumer<IndexInput, IndexInput, Exc
651651
});
652652
}
653653

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

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

735735
input.seek(start);

0 commit comments

Comments
 (0)