Skip to content

Commit

Permalink
in_tail: Fix a broken test on Windows
Browse files Browse the repository at this point in the history
Signed-off-by: Takuro Ashie <ashie@clear-code.com>
  • Loading branch information
ashie committed Dec 15, 2021
1 parent 0473b5b commit 4210f7d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/plugin/test_in_tail.rb
Expand Up @@ -2271,10 +2271,14 @@ def test_ENOENT_error_after_setup_watcher
'format' => 'none',
})
d = create_driver(config)
file_deleted = false
mock.proxy(d.instance).existence_path do |hash|
cleanup_file(path)
unless file_deleted
cleanup_file(path)
file_deleted = true
end
hash
end.at_least(1)
end.twice
assert_nothing_raised do
d.run(shutdown: false) {}
end
Expand All @@ -2300,7 +2304,7 @@ def test_EACCES_error_after_setup_watcher
mock.proxy(d.instance).existence_path do |hash|
FileUtils.chmod(0000, "#{TMP_DIR}/noaccess")
hash
end.at_least(1)
end.twice
assert_nothing_raised do
d.run(shutdown: false) {}
end
Expand Down

0 comments on commit 4210f7d

Please sign in to comment.