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