|
@@ -11,6 +11,7 @@ import org.elasticsearch.ExceptionsHelper;
|
|
|
import org.elasticsearch.action.ActionFuture;
|
|
|
import org.elasticsearch.action.admin.cluster.repositories.get.GetRepositoriesResponse;
|
|
|
import org.elasticsearch.action.admin.cluster.repositories.verify.VerifyRepositoryResponse;
|
|
|
+import org.elasticsearch.action.admin.cluster.snapshots.delete.DeleteSnapshotAction;
|
|
|
import org.elasticsearch.action.admin.cluster.state.ClusterStateResponse;
|
|
|
import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
|
|
import org.elasticsearch.client.internal.Client;
|
|
@@ -274,6 +275,18 @@ public class RepositoriesIT extends AbstractSnapshotIntegTestCase {
|
|
|
logger.info("--> waiting for block to kick in on node [{}]", blockedNode);
|
|
|
waitForBlock(blockedNode, repo);
|
|
|
|
|
|
+ assertTrue(
|
|
|
+ client().admin()
|
|
|
+ .cluster()
|
|
|
+ .prepareListTasks()
|
|
|
+ .setActions(DeleteSnapshotAction.NAME)
|
|
|
+ .setDetailed(true)
|
|
|
+ .get()
|
|
|
+ .getTasks()
|
|
|
+ .stream()
|
|
|
+ .anyMatch(ti -> ("[" + repo + "][" + snapshot1 + "]").equals(ti.description()))
|
|
|
+ );
|
|
|
+
|
|
|
logger.info("--> try deleting the repository, should fail because the deletion of the snapshot is in progress");
|
|
|
RepositoryConflictException e1 = expectThrows(
|
|
|
RepositoryConflictException.class,
|