diff --git a/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/TooManyJobsIT.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/TooManyJobsIT.java index 9684115fdd4..2f5cdb2b5a5 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/TooManyJobsIT.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/TooManyJobsIT.java @@ -57,6 +57,7 @@ public class TooManyJobsIT extends BaseMlIntegTestCase { assertEquals(JobState.OPENED, task.getStatus()); OpenJobAction.Request openJobRequest = (OpenJobAction.Request) task.getRequest(); assertEquals("1", openJobRequest.getJobId()); + cleanupWorkaround(1); } public void testSingleNode() throws Exception { diff --git a/plugin/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java index dab6a75a1aa..55de9c375ad 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java @@ -118,6 +118,8 @@ public abstract class BaseMlIntegTestCase extends SecurityIntegTestCase { internalCluster().stopRandomDataNode(); } internalCluster().startNode(Settings.builder().put(XPackSettings.MACHINE_LEARNING_ENABLED.getKey(), false)); + ensureStableCluster(1); + cluster().wipe(Collections.emptySet()); } private void deleteAllDatafeeds(Client client) throws Exception {