Fix SLMSnapshotBlockingIntegTest (#47941) (#47963)

The after snapshot action is interfering with SLM deleting snapshots
here it seems, causing concurrent delete exceptions.
Since these tests are now test-scoped there is no reason to run
snapshot deletes after each test so we can remove them to avoid this issue.

Closes #47937
This commit is contained in:
Armin Braun 2019-10-17 08:55:56 +02:00 committed by GitHub
parent 0ca7cc1848
commit 9bf8e1e060
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 19 deletions

View File

@ -38,7 +38,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;
@ -74,23 +73,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()
.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);
@ -287,7 +269,6 @@ public class SLMSnapshotBlockingIntegTests extends ESIntegTestCase {
}
}
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/47937")
public void testBasicFailureRetention() throws Exception {
testUnsuccessfulSnapshotRetention(false);