diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ml/action/StartDatafeedAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/StartDatafeedAction.java index 2fd11d56841..2d0cd26c6e4 100644 --- a/plugin/src/main/java/org/elasticsearch/xpack/ml/action/StartDatafeedAction.java +++ b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/StartDatafeedAction.java @@ -472,7 +472,7 @@ public class StartDatafeedAction JobState jobState = MlMetadata.getJobState(datafeed.getJobId(), tasks); if (jobState != JobState.OPENED) { throw ExceptionsHelper.conflictStatusException("cannot start datafeed [" + datafeedId + "] because job [" + job.getId() + - "] hasn't been opened"); + "] is not open"); } PersistentTask datafeedTask = MlMetadata.getDatafeedTask(datafeedId, tasks); diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ml/action/TransportJobTaskAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/TransportJobTaskAction.java index 23b71eefbcc..e6974c27f72 100644 --- a/plugin/src/main/java/org/elasticsearch/xpack/ml/action/TransportJobTaskAction.java +++ b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/TransportJobTaskAction.java @@ -63,7 +63,7 @@ public abstract class TransportJobTaskAction jobTask = MlMetadata.getJobTask(jobId, tasks); if (jobTask == null || jobTask.isAssigned() == false) { - String message = "Cannot perform requested action because job [" + jobId + "] hasn't been opened"; + String message = "Cannot perform requested action because job [" + jobId + "] is not open"; listener.onFailure(ExceptionsHelper.conflictStatusException(message)); } else { request.setNodes(jobTask.getExecutorNode()); @@ -81,7 +81,7 @@ public abstract class TransportJobTaskAction StartDatafeedAction.validate("foo-datafeed", mlMetadata2, tasks)); - assertThat(e.getMessage(), equalTo("cannot start datafeed [foo-datafeed] because job [job_id] hasn't been opened")); + assertThat(e.getMessage(), equalTo("cannot start datafeed [foo-datafeed] because job [job_id] is not open")); } public void testValidate_dataFeedAlreadyStarted() { diff --git a/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/MlRestTestStateCleaner.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/MlRestTestStateCleaner.java index 52edf7daa79..a085c629fd5 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/MlRestTestStateCleaner.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/MlRestTestStateCleaner.java @@ -84,7 +84,7 @@ public class MlRestTestStateCleaner { logger.error("Got status code " + statusCode + " when closing job " + jobId); } } catch (Exception e1) { - if (e1.getMessage().contains("because job [" + jobId + "] hasn't been opened")) { + if (e1.getMessage().contains("because job [" + jobId + "] is not open")) { logger.debug("job [" + jobId + "] has already been closed", e1); } else { logger.warn("failed to close job [" + jobId + "]. Forcing closed", e1); 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 27f5d2411fa..c403811b0e2 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 @@ -293,7 +293,7 @@ public abstract class BaseMlIntegTestCase extends ESIntegTestCase { client.execute(CloseJobAction.INSTANCE, closeRequest).get(); assertTrue(response.isClosed()); } catch (Exception e1) { - if (e1.getMessage().contains("because job [" + jobId + "] hasn't been opened")) { + if (e1.getMessage().contains("because job [" + jobId + "] is not open")) { logger.debug("job [" + jobId + "] has already been closed", e1); } else { try { diff --git a/qa/smoke-test-ml-with-security/src/test/java/org/elasticsearch/xpack/ml/integration/MlRestTestStateCleaner.java b/qa/smoke-test-ml-with-security/src/test/java/org/elasticsearch/xpack/ml/integration/MlRestTestStateCleaner.java index 52edf7daa79..a085c629fd5 100644 --- a/qa/smoke-test-ml-with-security/src/test/java/org/elasticsearch/xpack/ml/integration/MlRestTestStateCleaner.java +++ b/qa/smoke-test-ml-with-security/src/test/java/org/elasticsearch/xpack/ml/integration/MlRestTestStateCleaner.java @@ -84,7 +84,7 @@ public class MlRestTestStateCleaner { logger.error("Got status code " + statusCode + " when closing job " + jobId); } } catch (Exception e1) { - if (e1.getMessage().contains("because job [" + jobId + "] hasn't been opened")) { + if (e1.getMessage().contains("because job [" + jobId + "] is not open")) { logger.debug("job [" + jobId + "] has already been closed", e1); } else { logger.warn("failed to close job [" + jobId + "]. Forcing closed", e1);