OpenSearch/rest-api-spec/test/get_source/60_realtime_refresh.yaml
Luca Cavanna a3ad592198 [TEST] Fixed get_source/60_realtime_refresh REST test to work against multiple nodes
Replaced also wait for yellow with wait for green when using no replicas.

get_source/60_realtime_refresh tests per shard refresh using refresh:true and realtime:true in get api. We might run into troubles though if we have a replica that gets initialized after a doc was indexed without a refresh, as that doc will be found when searching against that specific replica shard (as a refresh happens automatically before a replica gets exposed as started).
2014-02-10 12:32:34 +01:00

51 lines
856 B
YAML

---
"Realtime":
- do:
indices.create:
index: test_1
body:
settings:
refresh_interval: -1
number_of_replicas: 0
- do:
cluster.health:
wait_for_status: green
- do:
index:
index: test_1
type: test
id: 1
body: { foo: bar }
- do:
get_source:
index: test_1
type: test
id: 1
realtime: 1
- match: { '': {foo: bar}}
- do:
catch: missing
get_source:
index: test_1
type: test
id: 1
realtime: 0
- do:
get_source:
index: test_1
type: test
id: 1
realtime: 0
refresh: 1
- match: { '': {foo: bar}}