diff --git a/plugin/src/test/java/org/elasticsearch/xpack/watcher/execution/ExecutionServiceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/execution/ExecutionServiceTests.java index fa39794717e..a1193a28bd2 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/watcher/execution/ExecutionServiceTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/watcher/execution/ExecutionServiceTests.java @@ -222,10 +222,6 @@ public class ExecutionServiceTests extends ESTestCase { verify(watchTransform, times(1)).execute(context, payload); verify(action, times(1)).execute("_action", context, payload); - // test execution duration - assertThat(watchRecord.result().executionDurationMs(), is(greaterThan(0L))); - assertThat(watchRecord.result().executionTime(), is(notNullValue())); - // test stats XContentSource source = new XContentSource(jsonBuilder().map(executionService.usageStats())); assertThat(source.getValue("execution.actions._all.total_time_in_ms"), is(notNullValue())); diff --git a/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/10_basic.yml b/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/10_basic.yml index 5993cc44478..71a9df9d241 100644 --- a/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/10_basic.yml +++ b/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/10_basic.yml @@ -61,6 +61,7 @@ teardown: - match: { watch_record.status.state.active: true } - is_true: watch_record.node - match: { watch_record.status.actions.indexme.ack.state: "ackable" } + - is_true: watch_record.result.execution_duration --- "Test execute watch API with user supplied watch":