Skip to content

Commit 16f5a51

Browse files
authored
[ML] Wait for ML indices in rolling upgrade tests (#30615)
1 parent 6ec5e44 commit 16f5a51

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/30_ml_jobs_crud.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,13 @@ setup:
8787
xpack.ml.close_job:
8888
job_id: mixed-cluster-job
8989

90+
# Wait for indices to be fully allocated before
91+
# killing the node
92+
- do:
93+
cluster.health:
94+
index: [".ml-state", ".ml-anomalies-shared"]
95+
wait_for_status: green
96+
9097
---
9198
"Test get job with rules":
9299

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@
4949
job_id: old-cluster-job
5050
- match: { count: 1 }
5151

52+
# Wait for indices to be fully allocated before
53+
# killing the node
54+
- do:
55+
cluster.health:
56+
index: [".ml-state", ".ml-anomalies-shared"]
57+
wait_for_status: green
58+
5259
---
5360
"Put job on the old cluster with the default model memory limit and post some data":
5461
- do:
@@ -96,6 +103,13 @@
96103
job_id: no-model-memory-limit-job
97104
- match: { count: 201 }
98105

106+
# Wait for indices to be fully allocated before
107+
# killing the node
108+
- do:
109+
cluster.health:
110+
index: [".ml-state", ".ml-anomalies-shared"]
111+
wait_for_status: green
112+
99113
---
100114
"Put job with empty strings in the configuration":
101115
- do:

0 commit comments

Comments
 (0)