Skip to content

Commit

Permalink
Merge pull request #3316 from kenhys/avoid-busy-loop-win
Browse files Browse the repository at this point in the history
test: add tiny wait not to lose globbed entries
  • Loading branch information
ashie committed Apr 6, 2021
2 parents f03611d + 13a9d59 commit 4b1ee63
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/plugin/test_output_as_buffered_backup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ def wait_flush(target_file)
waiting(5) {
target_dir = File.join(File.dirname(target_file), "*")
while Dir.glob(target_dir).size.zero?
# Avoid to lose globbed entries on Windows in busy loop
sleep 0.1 if Fluent.windows?
end
}
end
Expand Down

0 comments on commit 4b1ee63

Please sign in to comment.