Skip to content

Commit 4bdbc39

Browse files
Fix testQueuedSnapshotOperationsAndBrokenRepoOnMasterFailOverMultiple (#62713) (#62747)
There's possible retries here that work out if both the snapshot and the delete operation are retried when master shuts down and hits the unlikely case of the retried delete executing before the retried snapshot, making both operations pass. Closes #62686
1 parent 9ae2971 commit 4bdbc39

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

server/src/internalClusterTest/java/org/elasticsearch/snapshots/ConcurrentSnapshotsIT.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,12 @@ public void testQueuedSnapshotOperationsAndBrokenRepoOnMasterFailOverMultipleRep
806806
expectThrows(ElasticsearchException.class, snapshotThree::actionGet);
807807
expectThrows(ElasticsearchException.class, snapshotFour::actionGet);
808808
assertAcked(deleteFuture.get());
809-
expectThrows(ElasticsearchException.class, createBlockedSnapshot::actionGet);
809+
try {
810+
createBlockedSnapshot.actionGet();
811+
} catch (ElasticsearchException ex) {
812+
// Ignored, thrown most of the time but due to retries when shutting down the master could randomly pass when the request is
813+
// retried and gets executed after the above delete
814+
}
810815
}
811816

812817
public void testMultipleSnapshotsQueuedAfterDelete() throws Exception {

0 commit comments

Comments
 (0)