[TEST] improved regular scroll REST test

Added sort clause by field and checked docs returned each time
This commit is contained in:
javanna 2014-09-25 13:01:34 +02:00 committed by Luca Cavanna
parent e97b8fd217
commit 07ca08dbed

View File

@ -73,14 +73,14 @@
index: test_scroll
type: test
id: 42
body: { foo: bar }
body: { foo: 1 }
- do:
index:
index: test_scroll
type: test
id: 43
body: { foo: bar }
body: { foo: 2 }
- do:
indices.refresh: {}
@ -90,6 +90,7 @@
index: test_scroll
size: 1
scroll: 1m
sort: foo
body:
query:
match_all: {}
@ -97,13 +98,14 @@
- set: {_scroll_id: scroll_id}
- match: {hits.total: 2 }
- length: {hits.hits: 1 }
- match: {hits.hits.0._id: "42" }
- do:
index:
index: test_scroll
type: test
id: 44
body: { foo: bar }
body: { foo: 3 }
- do:
indices.refresh: {}
@ -115,6 +117,7 @@
- match: {hits.total: 2 }
- length: {hits.hits: 1 }
- match: {hits.hits.0._id: "43" }
- do:
scroll: