Skip to content

Commit

Permalink
[TEST] improved regular scroll REST test
Browse files Browse the repository at this point in the history
Added sort clause by field and checked docs returned each time
  • Loading branch information
javanna committed Sep 25, 2014
1 parent b10ff38 commit daac73f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions rest-api-spec/test/scroll/10_basic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}
Expand All @@ -90,20 +90,22 @@
index: test_scroll
size: 1
scroll: 1m
sort: foo
body:
query:
match_all: {}

- 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: {}
Expand All @@ -115,6 +117,7 @@

- match: {hits.total: 2 }
- length: {hits.hits: 1 }
- match: {hits.hits.0._id: "43" }

- do:
scroll:
Expand Down

0 comments on commit daac73f

Please sign in to comment.