From 16f5a515f307d5dcbc2a1544520012b4a7db7b0c Mon Sep 17 00:00:00 2001 From: David Kyle Date: Wed, 16 May 2018 09:52:25 +0100 Subject: [PATCH] [ML] Wait for ML indices in rolling upgrade tests (#30615) --- .../test/mixed_cluster/30_ml_jobs_crud.yml | 7 +++++++ .../test/old_cluster/30_ml_jobs_crud.yml | 14 ++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/30_ml_jobs_crud.yml b/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/30_ml_jobs_crud.yml index 7bfbb5ad8c4..4458b517448 100644 --- a/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/30_ml_jobs_crud.yml +++ b/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/30_ml_jobs_crud.yml @@ -87,6 +87,13 @@ setup: xpack.ml.close_job: job_id: mixed-cluster-job +# Wait for indices to be fully allocated before +# killing the node + - do: + cluster.health: + index: [".ml-state", ".ml-anomalies-shared"] + wait_for_status: green + --- "Test get job with rules": diff --git a/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/30_ml_jobs_crud.yml b/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/30_ml_jobs_crud.yml index 61f39107a2d..da36da301c1 100644 --- a/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/30_ml_jobs_crud.yml +++ b/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/30_ml_jobs_crud.yml @@ -49,6 +49,13 @@ job_id: old-cluster-job - match: { count: 1 } +# Wait for indices to be fully allocated before +# killing the node + - do: + cluster.health: + index: [".ml-state", ".ml-anomalies-shared"] + wait_for_status: green + --- "Put job on the old cluster with the default model memory limit and post some data": - do: @@ -96,6 +103,13 @@ job_id: no-model-memory-limit-job - match: { count: 201 } +# Wait for indices to be fully allocated before +# killing the node + - do: + cluster.health: + index: [".ml-state", ".ml-anomalies-shared"] + wait_for_status: green + --- "Put job with empty strings in the configuration": - do: