Skip to content

Commit e551e57

Browse files
committed
Add additional sleep for tailig spec
1 parent 89c7e20 commit e551e57

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

spec/filewatch/tailing_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ module FileWatch
5858
ENV["FILEWATCH_MAX_FILES_WARN_INTERVAL"] = "0"
5959
File.open(file_path, "wb") { |file| file.write("line1\nline2\n") }
6060
File.open(file_path2, "wb") { |file| file.write("line-A\nline-B\n") }
61+
sleep(0.25) # if ENV['CI']
6162
end
6263

6364
context "when max_active is 1" do

spec/inputs/file_read_spec.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,9 @@ def wait_for_start_processing(run_thread, timeout: 1.0)
363363
end
364364
end
365365

366-
def wait_for_file_removal(path, timeout: 5 * interval)
367-
wait(timeout).for { File.exist?(path) }.to be_falsey
366+
def wait_for_file_removal(path)
367+
Stud.try(20.times, RSpec::Expectations::ExpectationNotMetError) do
368+
expect(File.exist?(path)).to be_falsey
369+
end
368370
end
369371
end

0 commit comments

Comments
 (0)