We need to wait for no initializing shards before closing; otherwise, we might fail to close some recovering replicas. Closes #52701
@@ -107,6 +107,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