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

Fix an unstable test of in_tail (especially on macOS) #3314

Merged
merged 1 commit into from
Apr 2, 2021

Conversation

ashie
Copy link
Member

@ashie ashie commented Apr 2, 2021

Which issue(s) this PR fixes:
none

What this PR does / why we need it:
This commit try to fix the following failure:

  2021-04-02T00:47:45.1133120Z Failure: test_truncate_file(TailInputTest)
  2021-04-02T00:47:45.1140150Z /Users/runner/work/fluentd/fluentd/test/plugin/test_in_tail.rb:606:in `test_truncate_file'
  2021-04-02T00:47:45.1140850Z      603:     end
  2021-04-02T00:47:45.1141130Z      604:
  2021-04-02T00:47:45.1141450Z      605:     events = d.events
  2021-04-02T00:47:45.1141920Z   => 606:     assert_equal(3, events.length)
  2021-04-02T00:47:45.1142440Z      607:     assert_equal({"message" => "test3"}, events[0][2])
  2021-04-02T00:47:45.1142960Z      608:     assert_equal({"message" => "test4"}, events[1][2])
  2021-04-02T00:47:45.1143490Z      609:     assert_equal({"message" => "test1"}, events[2][2])
  2021-04-02T00:47:45.1143940Z <3> expected but was
  2021-04-02T00:47:45.1144370Z <1>

sleep time 1sec may too short when inotify isn't available or high load situation.

Docs Changes:
none

Release Note:
none

This commit try to fix the following failure:

  2021-04-02T00:47:45.1133120Z Failure: test_truncate_file(TailInputTest)
  2021-04-02T00:47:45.1140150Z /Users/runner/work/fluentd/fluentd/test/plugin/test_in_tail.rb:606:in `test_truncate_file'
  2021-04-02T00:47:45.1140850Z      603:     end
  2021-04-02T00:47:45.1141130Z      604:
  2021-04-02T00:47:45.1141450Z      605:     events = d.events
  2021-04-02T00:47:45.1141920Z   => 606:     assert_equal(3, events.length)
  2021-04-02T00:47:45.1142440Z      607:     assert_equal({"message" => "test3"}, events[0][2])
  2021-04-02T00:47:45.1142960Z      608:     assert_equal({"message" => "test4"}, events[1][2])
  2021-04-02T00:47:45.1143490Z      609:     assert_equal({"message" => "test1"}, events[2][2])
  2021-04-02T00:47:45.1143940Z <3> expected but was
  2021-04-02T00:47:45.1144370Z <1>

sleep time 1sec may too short when inotify isn't available or high load
situation.

Signed-off-by: Takuro Ashie <[email protected]>
@ashie
Copy link
Member Author

ashie commented Apr 2, 2021

It seems become stable.

@ashie ashie merged commit f03611d into fluent:master Apr 2, 2021
@ashie ashie deleted the fix-unstable-test-on-mac branch April 2, 2021 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant