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 9
9
# Limit the number of shards so that shards are unlikely
10
10
# to be relocated or being initialized between the test
11
11
# 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
13
15
mappings :
14
16
properties :
15
17
bar :
@@ -25,11 +27,6 @@ setup:
25
27
completion :
26
28
type : completion
27
29
28
- - do :
29
- cluster.health :
30
- index : test1
31
- wait_for_no_relocating_shards : true
32
-
33
30
- do :
34
31
index :
35
32
index : test1
@@ -73,6 +70,14 @@ setup:
73
70
body :
74
71
sort : [ "bar", "baz" ]
75
72
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
+
76
81
---
77
82
" Fields - blank " :
78
83
- do :
You can’t perform that action at this time.
0 commit comments