diff --git a/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/BasicDistributedJobsIT.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/BasicDistributedJobsIT.java index 6e1d687e7d3..559b9e81758 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/BasicDistributedJobsIT.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/BasicDistributedJobsIT.java @@ -341,7 +341,7 @@ public class BasicDistributedJobsIT extends BaseMlIntegTestCase { assertEquals(2, response.getDataCounts().getProcessedRecordCount()); CloseJobAction.Request closeJobRequest = new CloseJobAction.Request("job_id"); - client().execute(CloseJobAction.INSTANCE, closeJobRequest); + client().execute(CloseJobAction.INSTANCE, closeJobRequest).actionGet(); assertBusy(() -> { ClusterState clusterState = client().admin().cluster().prepareState().get().getState(); PersistentTasksCustomMetaData tasks = clusterState.getMetaData().custom(PersistentTasksCustomMetaData.TYPE);