Skip to content

Commit 036084c

Browse files
Handle Concurrent Repo Modification to Fix Test
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
1 parent 2d8dcf8 commit 036084c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/slm/SLMSnapshotBlockingIntegTests.java

+4
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,10 @@ public void testRetentionWhileSnapshotInProgress() throws Exception {
215215
SnapshotsStatusResponse s =
216216
client().admin().cluster().prepareSnapshotStatus(REPO).setSnapshots(completedSnapshotName).get();
217217
assertNull("expected no snapshot but one was returned", s.getSnapshots().get(0));
218+
} catch (RepositoryException e) {
219+
// Concurrent status calls and write operations may lead to failures in determining the current repository generation
220+
// TODO: Remove this hack once tracking the current repository generation has been made consistent
221+
throw new AssertionError(e);
218222
} catch (SnapshotMissingException e) {
219223
// Great, we wanted it to be deleted!
220224
}

0 commit comments

Comments
 (0)