From daac73f0231fb91b383c337617b84417a68eff0f Mon Sep 17 00:00:00 2001 From: javanna Date: Thu, 25 Sep 2014 13:01:34 +0200 Subject: [PATCH] [TEST] improved regular scroll REST test Added sort clause by field and checked docs returned each time --- rest-api-spec/test/scroll/10_basic.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/rest-api-spec/test/scroll/10_basic.yaml b/rest-api-spec/test/scroll/10_basic.yaml index 4aad500c59a46..168c03427ae39 100644 --- a/rest-api-spec/test/scroll/10_basic.yaml +++ b/rest-api-spec/test/scroll/10_basic.yaml @@ -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: