Skip to content

Commit 81e47e9

Browse files
authored
Improve watcher rolling upgrade tests (#52404)
Relates to #33185
1 parent d3db6cb commit 81e47e9

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/UpgradeClusterClientYamlTestSuiteIT.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public void waitForWatcher() throws Exception {
4646
Response response = client().performRequest(new Request("GET", "_watcher/stats"));
4747
Map<String, Object> responseBody = entityAsMap(response);
4848
List<?> stats = (List<?>) responseBody.get("stats");
49+
assertThat(stats.size(), equalTo(3));
4950
for (Object stat : stats) {
5051
Map<?, ?> statAsMap = (Map<?, ?>) stat;
5152
assertThat(statAsMap.get("watcher_state"), equalTo("started"));

x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/60_watcher.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@
2727
- match: { found : true}
2828
- match: { _id: "my_watch" }
2929

30+
- do:
31+
cluster.health:
32+
index: .watches
33+
wait_for_status: green
34+
wait_for_no_relocating_shards: true
35+
wait_for_events: languid
36+
timeout: 1m
37+
3038
# execute watch
3139
- do:
3240
watcher.execute_watch:

0 commit comments

Comments
 (0)