From a3ad5921986f2c5f306b22d3a1bebcbb1dd887a9 Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Mon, 10 Feb 2014 11:31:26 +0100 Subject: [PATCH] [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). --- rest-api-spec/test/exists/60_realtime_refresh.yaml | 3 ++- rest-api-spec/test/get/60_realtime_refresh.yaml | 2 +- rest-api-spec/test/get_source/60_realtime_refresh.yaml | 3 ++- rest-api-spec/test/mget/60_realtime_refresh.yaml | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/rest-api-spec/test/exists/60_realtime_refresh.yaml b/rest-api-spec/test/exists/60_realtime_refresh.yaml index debdd3b2d16..1025747a75c 100644 --- a/rest-api-spec/test/exists/60_realtime_refresh.yaml +++ b/rest-api-spec/test/exists/60_realtime_refresh.yaml @@ -9,9 +9,10 @@ index: refresh_interval: -1 number_of_replicas: 0 + - do: cluster.health: - wait_for_status: yellow + wait_for_status: green - do: index: diff --git a/rest-api-spec/test/get/60_realtime_refresh.yaml b/rest-api-spec/test/get/60_realtime_refresh.yaml index 214444c87be..4631bed0299 100644 --- a/rest-api-spec/test/get/60_realtime_refresh.yaml +++ b/rest-api-spec/test/get/60_realtime_refresh.yaml @@ -12,7 +12,7 @@ - do: cluster.health: - wait_for_status: yellow + wait_for_status: green - do: index: diff --git a/rest-api-spec/test/get_source/60_realtime_refresh.yaml b/rest-api-spec/test/get_source/60_realtime_refresh.yaml index 2e31bf1fb18..92f21caf8b4 100644 --- a/rest-api-spec/test/get_source/60_realtime_refresh.yaml +++ b/rest-api-spec/test/get_source/60_realtime_refresh.yaml @@ -8,10 +8,11 @@ body: settings: refresh_interval: -1 + number_of_replicas: 0 - do: cluster.health: - wait_for_status: yellow + wait_for_status: green - do: index: diff --git a/rest-api-spec/test/mget/60_realtime_refresh.yaml b/rest-api-spec/test/mget/60_realtime_refresh.yaml index 19570fd863e..c688b4b0e93 100644 --- a/rest-api-spec/test/mget/60_realtime_refresh.yaml +++ b/rest-api-spec/test/mget/60_realtime_refresh.yaml @@ -12,7 +12,7 @@ - do: cluster.health: - wait_for_status: yellow + wait_for_status: green - do: index: