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 committed by Joerg Reichert
parent 6fcff2f0b1
commit e0cf4b39e7

View file

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