Skip to content

Commit

Permalink
Fix testQueuedSnapshotOperationsAndBrokenRepoOnMasterFailOverMultiple (
Browse files Browse the repository at this point in the history
…#62713)

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
  • Loading branch information
original-brownbear committed Sep 22, 2020
1 parent 86ba0b2 commit dd55c72
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit dd55c72

Please sign in to comment.