Skip to content

Commit

Permalink
Improve watcher rolling upgrade tests
Browse files Browse the repository at this point in the history
Relates to elastic#33185
  • Loading branch information
martijnvg committed Feb 17, 2020
1 parent d3db6cb commit 267492c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public void waitForWatcher() throws Exception {
Response response = client().performRequest(new Request("GET", "_watcher/stats"));
Map<String, Object> responseBody = entityAsMap(response);
List<?> stats = (List<?>) responseBody.get("stats");
assertThat(stats.size(), equalTo(3));
for (Object stat : stats) {
Map<?, ?> statAsMap = (Map<?, ?>) stat;
assertThat(statAsMap.get("watcher_state"), equalTo("started"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@
- match: { found : true}
- match: { _id: "my_watch" }

- do:
cluster.health:
index: .watches
wait_for_status: green
wait_for_no_relocating_shards: true
wait_for_events: languid
timeout: 1m

# execute watch
- do:
watcher.execute_watch:
Expand Down

0 comments on commit 267492c

Please sign in to comment.