File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.stats Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 99 # Limit the number of shards so that shards are unlikely
1010 # to be relocated or being initialized between the test
1111 # set up and the test execution
12- index.number_of_shards : 2
12+ # The tests in `IndexStatsIT` provide sufficient coverage for multi-shard scenarios.
13+ index.number_of_shards : 1
14+ index.number_of_replicas : 0
1315 mappings :
1416 properties :
1517 bar :
@@ -25,11 +27,6 @@ setup:
2527 completion :
2628 type : completion
2729
28- - do :
29- cluster.health :
30- index : test1
31- wait_for_no_relocating_shards : true
32-
3330 - do :
3431 index :
3532 index : test1
@@ -73,6 +70,14 @@ setup:
7370 body :
7471 sort : [ "bar", "baz" ]
7572
73+ # Wait for the shards to be allocated to avoid missing results in the stats request
74+ # See https://github.com/elastic/elasticsearch/issues/96711#issuecomment-2996311920 for more context
75+ - do :
76+ cluster.health :
77+ index : test1
78+ wait_for_status : green
79+ wait_for_no_relocating_shards : true
80+
7681---
7782" Fields - blank " :
7883 - do :
You can’t perform that action at this time.
0 commit comments