Skip to content

Commit

Permalink
Handle Concurrent Repo Modification to Fix Test (#48433)
Browse files Browse the repository at this point in the history
Just like #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 #47834
  • Loading branch information
original-brownbear authored Oct 24, 2019
1 parent b3d9f0a commit 42f66ac
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,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 42f66ac

Please sign in to comment.