Skip to content

Commit c2e0061

Browse files
committed
[ML] Wait for ML indices in rolling upgrade tests (#30615)
1 parent b1eda60 commit c2e0061

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
@@ -110,6 +110,13 @@ setup:
110110
xpack.ml.close_job:
111111
job_id: mixed-cluster-job
112112

113+
# Wait for indices to be fully allocated before
114+
# killing the node
115+
- do:
116+
cluster.health:
117+
index: [".ml-state", ".ml-anomalies-shared"]
118+
wait_for_status: green
119+
113120
---
114121
"Test get job with rules":
115122

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)