Skip to content

Commit

Permalink
Settle on better ES start/stop syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
thatandromeda committed Aug 13, 2018
1 parent 3e770f2 commit c3523ad
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spec/support/elasticsearch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
# This may throw a warning that the cluster is already running, but you can
# ignore that.
config.before :suite do
unless Elasticsearch::Extensions::Test::Cluster.running?(on: es_port)
Elasticsearch::Extensions::Test::Cluster.start(**es_options)
if Elasticsearch::Extensions::Test::Cluster.running?(on: es_port)
Elasticsearch::Extensions::Test::Cluster.stop(**es_options)
end
Elasticsearch::Extensions::Test::Cluster.start(**es_options)
end

# Reload connections periodically to avoid test failures due to exhausting
Expand Down

0 comments on commit c3523ad

Please sign in to comment.