From 69b3ffa40a5484cc895e40e6972632c38682cde5 Mon Sep 17 00:00:00 2001 From: Alexander Reelsen Date: Mon, 14 Aug 2017 11:50:53 +0200 Subject: [PATCH] Tests: Remove useless wait time in watcher REST test The rest test waited for the watch to run in the background, but there were no guarantees that this really happened. Also it waited for five seconds, instead of just executing the watch manually. relates elastic/x-pack-elasticsearch#2255 Original commit: elastic/x-pack-elasticsearch@56765a649e4db3a62e1bb86cd92eaca2b73557a4 --- .../rest-api-spec/test/actions/10_webhook.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/qa/smoke-test-watcher-with-mustache/src/test/resources/rest-api-spec/test/actions/10_webhook.yml b/qa/smoke-test-watcher-with-mustache/src/test/resources/rest-api-spec/test/actions/10_webhook.yml index 671a16df0c8..50ee1f6eafd 100644 --- a/qa/smoke-test-watcher-with-mustache/src/test/resources/rest-api-spec/test/actions/10_webhook.yml +++ b/qa/smoke-test-watcher-with-mustache/src/test/resources/rest-api-spec/test/actions/10_webhook.yml @@ -52,13 +52,16 @@ - match: { _id: "test_watch" } - match: { created: true } - # Simulate a Thread.sleep() - do: - catch: request_timeout - cluster.health: - wait_for_nodes: 99 - timeout: 5s - - match: { "timed_out": true } + xpack.watcher.execute_watch: + id: test_watch + body: + record_execution: true + action_modes: + _all: execute + + - match: { watch_record.state: "executed" } + - match: { watch_record.result.actions.0.status: "success" } - do: get: