Skip to content

Commit

Permalink
test_in_tail: Make sure to wait completing first read
Browse files Browse the repository at this point in the history
Otherwise whole of the first file might be detected as a rotated file so
that in_tail tries to read it from head despite of `read_from_head=false`

Signed-off-by: Takuro Ashie <[email protected]>
  • Loading branch information
ashie committed Jun 1, 2022
1 parent f6994e9 commit 4e78a31
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/plugin/test_in_tail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,7 @@ def sub_test_rotate_file(config = nil, expect_emits: nil, expect_records: nil, t

d = create_driver(config)
d.run(expect_emits: expect_emits, expect_records: expect_records, timeout: timeout) do
sleep(0.1) while d.instance.instance_variable_get(:@startup)
size = d.emit_count
file.puts "test3"
file.puts "test4"
Expand Down

0 comments on commit 4e78a31

Please sign in to comment.