Tests: Dont check for execution speed, only that field exists

Execution might be fast in combination with the clock not being counted
fast enough. As we are only interested in the field existing, we dont
need to check for the value.

relates elastic/x-pack-elasticsearch#2391

Original commit: elastic/x-pack-elasticsearch@8f3df967d9
This commit is contained in:
Alexander Reelsen 2017-08-30 13:38:50 +02:00
parent 4ac13fa9c5
commit 80df309bbd
2 changed files with 1 additions and 4 deletions

View File

@ -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()));

View File

@ -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":