From 524d4c24841e4a5314d1b19c2d018f07e7238245 Mon Sep 17 00:00:00 2001 From: Tanguy Leroux Date: Wed, 27 Oct 2021 10:10:37 +0200 Subject: [PATCH] Fix testBlobStoreCache (#79747) The attempt to fix this test in #78616 wasn't complete: we need to wait for all mounted indices, not only the last restored one, before deleting the indices. Otherwise one of the mounted index might still be initializing and recreates the cached documents in `.snapshot-blob-cache` Closes #78993 --- .../blob/SearchableSnapshotsBlobStoreCacheIntegTests.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugin/searchable-snapshots/src/internalClusterTest/java/org/elasticsearch/xpack/searchablesnapshots/cache/blob/SearchableSnapshotsBlobStoreCacheIntegTests.java b/x-pack/plugin/searchable-snapshots/src/internalClusterTest/java/org/elasticsearch/xpack/searchablesnapshots/cache/blob/SearchableSnapshotsBlobStoreCacheIntegTests.java index 7254eb56bb91e..b2c10812a9caf 100644 --- a/x-pack/plugin/searchable-snapshots/src/internalClusterTest/java/org/elasticsearch/xpack/searchablesnapshots/cache/blob/SearchableSnapshotsBlobStoreCacheIntegTests.java +++ b/x-pack/plugin/searchable-snapshots/src/internalClusterTest/java/org/elasticsearch/xpack/searchablesnapshots/cache/blob/SearchableSnapshotsBlobStoreCacheIntegTests.java @@ -304,7 +304,8 @@ public Settings onNodeStopped(String nodeName) throws Exception { .build(); } }); - ensureGreen(restoredAgainIndex); + + ensureGreen("restored-*"); assertRecoveryStats(restoredAgainIndex, false); assertExecutorIsIdle(SearchableSnapshots.CACHE_FETCH_ASYNC_THREAD_POOL_NAME);