diff --git a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/ConcurrentSnapshotsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/ConcurrentSnapshotsIT.java index 397c9def6411e..8d5deea11a254 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/ConcurrentSnapshotsIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/ConcurrentSnapshotsIT.java @@ -807,7 +807,12 @@ public void testQueuedSnapshotOperationsAndBrokenRepoOnMasterFailOverMultipleRep expectThrows(ElasticsearchException.class, snapshotThree::actionGet); expectThrows(ElasticsearchException.class, snapshotFour::actionGet); assertAcked(deleteFuture.get()); - expectThrows(ElasticsearchException.class, createBlockedSnapshot::actionGet); + try { + createBlockedSnapshot.actionGet(); + } catch (ElasticsearchException ex) { + // Ignored, thrown most of the time but due to retries when shutting down the master could randomly pass when the request is + // retried and gets executed after the above delete + } } public void testMultipleSnapshotsQueuedAfterDelete() throws Exception {