Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_in_tail: Show more information of test_unwatched_files_should_be_removed #3784

Merged
merged 1 commit into from Jun 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 12 additions & 3 deletions test/plugin/test_in_tail.rb
Expand Up @@ -1612,9 +1612,18 @@ def test_unwatched_files_should_be_removed
waiting(20) { sleep 0.1 until Dir.glob("#{@tmp_dir}/*.txt").size == 0 } # Ensure file is deleted on Windows
waiting(5) { sleep 0.1 until d.instance.instance_variable_get(:@tails).keys.size <= 0 }

assert_equal(0, d.instance.instance_variable_get(:@tails).keys.size)

d.instance_shutdown
assert_equal(
{
files: [],
tails: {}
},
{
files: Dir.glob("#{@tmp_dir}/*.txt"),
tails: d.instance.instance_variable_get(:@tails)
}
)
ensure
d.instance_shutdown if d && d.instance
end

def count_timer_object
Expand Down