From f0bc8abcd022bef6c2a265efbd2f6439a1633e70 Mon Sep 17 00:00:00 2001 From: Nhat Nguyen Date: Wed, 26 Feb 2020 08:13:31 -0500 Subject: [PATCH] Fix translog stats on closed indices yaml test (#52800) We need to wait for no initializing shards before closing; otherwise, we might fail to close some recovering replicas. Closes #52701 --- .../rest-api-spec/test/indices.stats/20_translog.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.stats/20_translog.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.stats/20_translog.yml index 64581b61f87..20f9f1f4ef3 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.stats/20_translog.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.stats/20_translog.yml @@ -256,6 +256,10 @@ metric: [ translog ] - match: { indices.test.primaries.translog.operations: 1 } - match: { indices.test.primaries.translog.uncommitted_operations: 1 } + - do: + cluster.health: + wait_for_no_initializing_shards: true + wait_for_events: languid - do: indices.close: index: test