Skip to content

Commit 42f66ac

Browse files
Handle Concurrent Repo Modification to Fix Test (#48433)
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
1 parent b3d9f0a commit 42f66ac

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
@@ -217,6 +217,10 @@ public void testRetentionWhileSnapshotInProgress() throws Exception {
217217
SnapshotsStatusResponse s =
218218
client().admin().cluster().prepareSnapshotStatus(REPO).setSnapshots(completedSnapshotName).get();
219219
assertNull("expected no snapshot but one was returned", s.getSnapshots().get(0));
220+
} catch (RepositoryException e) {
221+
// Concurrent status calls and write operations may lead to failures in determining the current repository generation
222+
// TODO: Remove this hack once tracking the current repository generation has been made consistent
223+
throw new AssertionError(e);
220224
} catch (SnapshotMissingException e) {
221225
// Great, we wanted it to be deleted!
222226
}

0 commit comments

Comments
 (0)