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