test_in_tail: relax too-tight timeouts in file-appended-after-start tests#5446
Open
Watson1978 wants to merge 1 commit into
Open
test_in_tail: relax too-tight timeouts in file-appended-after-start tests#5446Watson1978 wants to merge 1 commit into
Watson1978 wants to merge 1 commit into
Conversation
…ests
`test_emit_with_read_lines_limit[flat 1]` fails intermittently on CI
(Ruby 3.4, windows-11-arm) with:
test/plugin/test_in_tail.rb:509
assert_equal(true, events.length > 0)
<true> expected but was <false>
i.e. no event was emitted within the 2s timeout.
These tests create/append the target file *after* `d.run` starts, so the
new content is only picked up by the periodic `refresh_watchers` timer
(refresh_interval = 1s here). The first emit is therefore structurally
pinned to ~1s regardless of machine speed, and `timeout: 2` leaves only
~1s of margin.
A timeout threshold sweep (30 runs each) shows both macOS and Windows 11
ARM share the ~1s floor (0.8s always fails), but Windows has large jitter
around it (13/30 fail at timeout 1.0s vs 0/30 on macOS). On the slower,
more-contended windows-11-arm CI runner that jitter occasionally exceeds
the 2s timeout, causing the flake.
`expect_emits:` returns as soon as the expected emits arrive (~1s), so
raising the timeout does not slow the passing case; a real "no emit"
regression is still caught, just after 10s instead of 2s.
Relax the timeouts of the three in_tail tests that share this
"file activity after run starts + short timeout" shape:
- test_emit_with_read_lines_limit: 2 -> 10
- test_always_read_from_head_on_detecting_a_new_file: 3 -> 10
- test_watch_wildcard_path_without_watch_timer: 1 -> 10 (Linux-only,
but had the tightest timeout)
Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue(s) this PR fixes:
Fixes #
What this PR does / why we need it:
test_emit_with_read_lines_limit[flat 1]fails intermittently on CI (Ruby 3.4, windows-11-arm) with:https://github.com/fluent/fluentd/actions/runs/29549033055/job/87787458652#step:6:5460
i.e. no event was emitted within the 2s timeout.
These tests create/append the target file after
d.runstarts, so the new content is only picked up by the periodicrefresh_watcherstimer.The first emit is therefore structurally pinned to ~1s regardless of machine speed, and
timeout: 2leaves only ~1s of margin.A timeout threshold sweep (30 runs each) shows both macOS and Windows 11 ARM share the ~1s floor (0.8s always fails), but Windows has large jitter around it (13/30 fail at timeout 1.0s vs 0/30 on macOS). On the slower, more-contended windows-11-arm CI runner that jitter occasionally exceeds the 2s timeout, causing the flake.
expect_emits:returns as soon as the expected emits arrive (~1s), so raising the timeout does not slow the passing case; a real "no emit" regression is still caught, just after 10s instead of 2s.Relax the timeouts of the three in_tail tests that share this "file activity after run starts + short timeout" shape:
Docs Changes:
N/A
Release Note:
N/A