Skip to content

Commit ed36f38

Browse files
committed
Fix data stream stats YAML test
Occasional shard allocation issues were causing the YAML tests to fail because the shard that had the document with the max timestamp in it would be unavailable.
1 parent 6a1a862 commit ed36f38

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

modules/data-streams/src/yamlRestTest/resources/rest-api-spec/test/data_stream/120_data_streams_stats.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,18 @@ setup:
185185
body: { "@timestamp": 1593639468350 }
186186
refresh: true
187187

188+
# Wait for the shards to be allocated to avoid missing results in the stats request
189+
- do:
190+
cluster.health:
191+
index: simple-data-stream1,simple-data-stream2
192+
wait_for_status: green
193+
wait_for_no_relocating_shards: true
194+
188195
- do:
189196
indices.data_streams_stats: {}
197+
- match: { _shards.total: 3 }
198+
- match: { _shards.successful: 3 }
199+
- match: { _shards.failed: 0 }
190200
- match: { data_stream_count: 2 }
191201
- match: { backing_indices: 3 }
192202
- length: { data_streams: 2 }

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,6 @@ tests:
102102
- class: org.elasticsearch.packaging.test.ArchiveTests
103103
method: test51AutoConfigurationWithPasswordProtectedKeystore
104104
issue: https://github.com/elastic/elasticsearch/issues/118212
105-
- class: org.elasticsearch.datastreams.DataStreamsClientYamlTestSuiteIT
106-
method: test {p0=data_stream/120_data_streams_stats/Multiple data stream}
107-
issue: https://github.com/elastic/elasticsearch/issues/118217
108105
- class: org.elasticsearch.xpack.ccr.rest.ShardChangesRestIT
109106
method: testShardChangesNoOperation
110107
issue: https://github.com/elastic/elasticsearch/issues/118800

0 commit comments

Comments
 (0)