This test must check for state `SUCCESS` as well. `SUCESS` in `SnapshotsInProgress` means "all data nodes finished snapshotting sucessfully but master must still finalize the snapshot in the repo". `SUCESS` does not mean that the snapshot is actually fully finished in this object. You can easily reporduce the scenario in #49303 that has an in-progress snapshot in `SUCCESS` state by waiting 20s before running the busy assert loop on the snapshot status so that all steps but the blocked finalization can finish. Closes #49303
This commit is contained in:
parent
2502ff39a0
commit
af0f97d50a
|
@ -143,7 +143,8 @@ public class SLMSnapshotBlockingIntegTests extends ESIntegTestCase {
|
||||||
SnapshotLifecyclePolicyItem.SnapshotInProgress inProgress = item.getSnapshotInProgress();
|
SnapshotLifecyclePolicyItem.SnapshotInProgress inProgress = item.getSnapshotInProgress();
|
||||||
assertThat(inProgress.getSnapshotId().getName(), equalTo(snapshotName));
|
assertThat(inProgress.getSnapshotId().getName(), equalTo(snapshotName));
|
||||||
assertThat(inProgress.getStartTime(), greaterThan(0L));
|
assertThat(inProgress.getStartTime(), greaterThan(0L));
|
||||||
assertThat(inProgress.getState(), anyOf(equalTo(SnapshotsInProgress.State.INIT), equalTo(SnapshotsInProgress.State.STARTED)));
|
assertThat(inProgress.getState(), anyOf(equalTo(SnapshotsInProgress.State.INIT), equalTo(SnapshotsInProgress.State.STARTED),
|
||||||
|
equalTo(SnapshotsInProgress.State.SUCCESS)));
|
||||||
assertNull(inProgress.getFailure());
|
assertNull(inProgress.getFailure());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue