Skip to content

Commit

Permalink
fix integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
kaisecheng committed Oct 6, 2022
1 parent f5f7c4b commit 45ed6ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/integration/outputs/no_es_on_startup_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
allow_any_instance_of(LogStash::Outputs::ElasticSearch::HttpClient::Pool).to receive(:get_es_version).and_raise(
::LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError.new StandardError.new("TEST: before docs are sent"), 'http://test.es/'
)
allow(subject).to receive(:maximum_seen_major_version).at_least(:once).and_return(ESHelper.es_version)
allow(subject).to receive(:maximum_seen_major_version).at_least(:once).and_return(ESHelper.es_version.to_i)
subject.register
allow_any_instance_of(LogStash::Outputs::ElasticSearch::HttpClient::Pool).to receive(:get_es_version).and_return(ESHelper.es_version)
subject.multi_receive([event1, event2])
Expand All @@ -49,7 +49,7 @@
allow_any_instance_of(LogStash::Outputs::ElasticSearch::HttpClient::Pool).to receive(:get_es_version).and_raise(
::LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError.new StandardError.new("TEST: after docs are sent"), 'http://test.es/'
)
allow(subject).to receive(:maximum_seen_major_version).at_least(:once).and_return(ESHelper.es_version)
allow(subject).to receive(:maximum_seen_major_version).at_least(:once).and_return(ESHelper.es_version.to_i)
subject.register
Thread.new do
sleep 4
Expand Down

0 comments on commit 45ed6ab

Please sign in to comment.