Fix SearchableSnapshotDirectoryTests.testClearCache (#56277)
This test sometimes fails when prewarming is enabled because it's possible that some files are cached in background while the test tries to clear the cache. This commit disables prewarming for this test.
This commit is contained in:
parent
33d6a55d1d
commit
65a061e33a
|
@ -531,7 +531,9 @@ public class SearchableSnapshotDirectoryTests extends ESTestCase {
|
|||
shardId,
|
||||
Settings.builder()
|
||||
.put(SNAPSHOT_CACHE_ENABLED_SETTING.getKey(), true)
|
||||
.put(SNAPSHOT_CACHE_PREWARM_ENABLED_SETTING.getKey(), randomBoolean())
|
||||
// disable prewarming in this test to prevent files to be concurrently cached
|
||||
// while the cache is cleared out and while the test verifies it is empty
|
||||
.put(SNAPSHOT_CACHE_PREWARM_ENABLED_SETTING.getKey(), false)
|
||||
.build(),
|
||||
() -> 0L,
|
||||
cacheService,
|
||||
|
|
Loading…
Reference in New Issue