diff --git a/x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/slm/SLMSnapshotBlockingIntegTests.java b/x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/slm/SLMSnapshotBlockingIntegTests.java index c5f0c3abe58..ddce81b479c 100644 --- a/x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/slm/SLMSnapshotBlockingIntegTests.java +++ b/x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/slm/SLMSnapshotBlockingIntegTests.java @@ -41,6 +41,7 @@ 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; @@ -76,6 +77,11 @@ public class SLMSnapshotBlockingIntegTests extends AbstractSnapshotIntegTestCase ensureGreen(); } + @After + public void awaitNoMoreRunningOps() throws Exception { + awaitNoMoreRunningOperations(internalCluster().getMasterName()); + } + @Override protected Collection> nodePlugins() { return Arrays.asList(MockRepository.Plugin.class, LocalStateCompositeXPackPlugin.class, IndexLifecycle.class); @@ -391,7 +397,6 @@ public class SLMSnapshotBlockingIntegTests extends AbstractSnapshotIntegTestCase assertEquals(SnapshotState.SUCCESS, snapshotInfo.state()); }); } - awaitNoMoreRunningOperations(internalCluster().getMasterName()); } public void testSLMRetentionAfterRestore() throws Exception {