From e0cf4b39e748af1a02bf2666599aff883dc6ee67 Mon Sep 17 00:00:00 2001 From: Lars Henrik Mai Date: Sat, 27 Feb 2016 10:43:15 +0100 Subject: [PATCH] Fix 503 errors in tests from Elasticsearch due to cluster not being ready --- spec/support/elasticsearch.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/support/elasticsearch.rb b/spec/support/elasticsearch.rb index 24e5784..2a3f246 100644 --- a/spec/support/elasticsearch.rb +++ b/spec/support/elasticsearch.rb @@ -1,6 +1,6 @@ RSpec.configure do |config| config.before :each, elasticsearch: true do Paper.__elasticsearch__.create_index!(force: true) - sleep 2 + Elasticsearch::Model.client.cluster.health wait_for_status: "yellow" end end