Skip to content

Commit

Permalink
Test Failure Fix: Retry pipeline metrics
Browse files Browse the repository at this point in the history
Fixes #7724

Fixes #7728
  • Loading branch information
jakelandis committed Jul 18, 2017
1 parent aedf397 commit a25d329
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions logstash-core/spec/logstash/pipeline_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
require_relative "../support/mocks_classes"
require_relative "../support/helpers"
require_relative "../logstash/pipeline_reporter_spec" # for DummyOutput class
require "stud/try"

class DummyInput < LogStash::Inputs::Base
config_name "dummyinput"
Expand Down Expand Up @@ -799,10 +800,12 @@ class TestPipeline < LogStash::Pipeline
sleep(0.1) until subject.ready?

# make sure we have received all the generated events
wait(3).for do
# give us a bit of time to flush the events
dummyoutput.events.size >= number_of_events
end.to be_truthy
Stud.try(10.times, [StandardError, RSpec::Expectations::ExpectationNotMetError]) do
wait(3).for do
# give us a bit of time to flush the events
dummyoutput.events.size >= number_of_events
end.to be_truthy
end
end

after :each do
Expand Down

0 comments on commit a25d329

Please sign in to comment.