mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 09:28:55 -04:00
Fix index stats field data YAML test (#129816)
Occasional shard allocation issues were causing the YAML tests to fail because the shard that had the document in it would be unavailable. Fixes #96711
This commit is contained in:
parent
53dae7a3a2
commit
f430a6c28c
1 changed files with 11 additions and 6 deletions
|
@ -9,7 +9,9 @@ setup:
|
||||||
# Limit the number of shards so that shards are unlikely
|
# Limit the number of shards so that shards are unlikely
|
||||||
# to be relocated or being initialized between the test
|
# to be relocated or being initialized between the test
|
||||||
# set up and the test execution
|
# set up and the test execution
|
||||||
index.number_of_shards: 2
|
# The tests in `IndexStatsIT` provide sufficient coverage for multi-shard scenarios.
|
||||||
|
index.number_of_shards: 1
|
||||||
|
index.number_of_replicas: 0
|
||||||
mappings:
|
mappings:
|
||||||
properties:
|
properties:
|
||||||
bar:
|
bar:
|
||||||
|
@ -25,11 +27,6 @@ setup:
|
||||||
completion:
|
completion:
|
||||||
type: completion
|
type: completion
|
||||||
|
|
||||||
- do:
|
|
||||||
cluster.health:
|
|
||||||
index: test1
|
|
||||||
wait_for_no_relocating_shards: true
|
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
index:
|
index:
|
||||||
index: test1
|
index: test1
|
||||||
|
@ -73,6 +70,14 @@ setup:
|
||||||
body:
|
body:
|
||||||
sort: [ "bar", "baz" ]
|
sort: [ "bar", "baz" ]
|
||||||
|
|
||||||
|
# Wait for the shards to be allocated to avoid missing results in the stats request
|
||||||
|
# See https://github.com/elastic/elasticsearch/issues/96711#issuecomment-2996311920 for more context
|
||||||
|
- do:
|
||||||
|
cluster.health:
|
||||||
|
index: test1
|
||||||
|
wait_for_status: green
|
||||||
|
wait_for_no_relocating_shards: true
|
||||||
|
|
||||||
---
|
---
|
||||||
"Fields - blank":
|
"Fields - blank":
|
||||||
- do:
|
- do:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue