Skip to content

Commit

Permalink
Handle Concurrent Repo Modification to Fix Test
Browse files Browse the repository at this point in the history
Just like elastic#48329 (and using the changes) in that PR
we can run into a concurrent repo modification that we
will throw on and must retry until consistent handling of
this situation is implemented.

Closes elastic#47384
  • Loading branch information
original-brownbear committed Oct 23, 2019
1 parent 2d8dcf8 commit 036084c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,10 @@ public void testRetentionWhileSnapshotInProgress() throws Exception {
SnapshotsStatusResponse s =
client().admin().cluster().prepareSnapshotStatus(REPO).setSnapshots(completedSnapshotName).get();
assertNull("expected no snapshot but one was returned", s.getSnapshots().get(0));
} catch (RepositoryException e) {
// Concurrent status calls and write operations may lead to failures in determining the current repository generation
// TODO: Remove this hack once tracking the current repository generation has been made consistent
throw new AssertionError(e);
} catch (SnapshotMissingException e) {
// Great, we wanted it to be deleted!
}
Expand Down

0 comments on commit 036084c

Please sign in to comment.