Fix 503 errors in tests from Elasticsearch due to cluster not being ready

This commit is contained in:
Lars Henrik Mai 2016-02-27 10:43:15 +01:00
parent 424cc0bf46
commit 83be2d5db1

View file

@ -1,5 +1,6 @@
RSpec.configure do |config|
config.before :each, elasticsearch: true do
Paper.__elasticsearch__.create_index!(force: true)
Elasticsearch::Model.client.cluster.health wait_for_status: "yellow"
end
end