mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
Add at_least(:once) to work around intermittent test failures
The test that calls out to /proc/loadavg has been intermittently failing, because /proc/loadavg is being read from more than once This should be benign, so this commit allows it to happen Fixes #6867 Fixes #7757
This commit is contained in:
parent
f1361de660
commit
b5c540010b
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ describe LogStash::Instrument::PeriodicPoller::JVM do
|
|||
before do
|
||||
expect(LogStash::Environment).to receive(:windows?).and_return(false)
|
||||
expect(LogStash::Environment).to receive(:linux?).and_return(true)
|
||||
expect(::File).to receive(:read).with("/proc/loadavg").and_raise("Didnt work out so well")
|
||||
expect(::File).to receive(:read).with("/proc/loadavg").at_least(:once).and_raise("Didnt work out so well")
|
||||
end
|
||||
|
||||
it "doesn't raise an exception" do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue