|
@@ -37,7 +37,6 @@ import org.elasticsearch.xpack.core.slm.action.ExecuteSnapshotRetentionAction;
|
|
|
import org.elasticsearch.xpack.core.slm.action.GetSnapshotLifecycleAction;
|
|
|
import org.elasticsearch.xpack.core.slm.action.PutSnapshotLifecycleAction;
|
|
|
import org.elasticsearch.xpack.ilm.IndexLifecycle;
|
|
|
-import org.junit.After;
|
|
|
import org.junit.Before;
|
|
|
|
|
|
import java.util.Arrays;
|
|
@@ -73,23 +72,6 @@ public class SLMSnapshotBlockingIntegTests extends ESIntegTestCase {
|
|
|
ensureGreen();
|
|
|
}
|
|
|
|
|
|
- @After
|
|
|
- public void resetSLMSettings() throws Exception {
|
|
|
- // Cancel/delete all snapshots
|
|
|
- assertBusy(() -> {
|
|
|
- logger.info("--> wiping all snapshots after test");
|
|
|
- client().admin().cluster().prepareGetSnapshots(REPO).get().getSnapshots(REPO)
|
|
|
- .forEach(snapshotInfo -> {
|
|
|
- try {
|
|
|
- client().admin().cluster().prepareDeleteSnapshot(REPO, snapshotInfo.snapshotId().getName()).get();
|
|
|
- } catch (Exception e) {
|
|
|
- logger.warn("exception cleaning up snapshot " + snapshotInfo.snapshotId().getName(), e);
|
|
|
- fail("exception cleanup up snapshot");
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
@Override
|
|
|
protected Collection<Class<? extends Plugin>> nodePlugins() {
|
|
|
return Arrays.asList(MockRepository.Plugin.class, LocalStateCompositeXPackPlugin.class, IndexLifecycle.class);
|
|
@@ -253,10 +235,8 @@ public class SLMSnapshotBlockingIntegTests extends ESIntegTestCase {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/47937")
|
|
|
public void testBasicFailureRetention() throws Exception {
|
|
|
testUnsuccessfulSnapshotRetention(false);
|
|
|
-
|
|
|
}
|
|
|
|
|
|
public void testBasicPartialRetention() throws Exception {
|