Backport(v1.19): test_in_tail: fix flaky test for already throttled log reading (#5474) - #5477
Merged
Merged
Conversation
**Which issue(s) this PR fixes**:
Fixes #
**What this PR does / why we need it**:
`test_emit_with_read_bytes_limit_per_second` in `reads_bytes_per_second
w/ throttled already` was intermittently failing, especially on macOS CI
runners.
```
4) Failure: test_emit_with_read_bytes_limit_per_second[flat 65536 bytes](TailInputTest::singleline::log throttling per file::reads_bytes_per_second w/ throttled already)
/Users/runner/work/fluentd/fluentd/test/plugin/test_in_tail.rb:636
636: assert_equal([], d.events)
<[]> expected but was
<[["t1", 2026-08-13 04:57:42.938460000 +0000, {"message"=>"xxxx..."}]]>
```
Ref.
https://github.com/fluent/fluentd/actions/runs/31667602802/job/94345429056#step:6:5450
The `in_tail` throttling test must finish within a strict 1-second
window before the timer (`@start_reading_time`) resets. Previously, the
test appended logs for a fixed 0.8 seconds, leaving less than a
0.1-second margin. On loaded CI runners, this easily exceeded 1 second,
causing the window to reset and unexpectedly emit pending logs.
**Docs Changes**:
N/A
**Release Note**:
N/A
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Watson1978
approved these changes
Aug 24, 2026
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:
Backport #5474
Fixes #
What this PR does / why we need it:
test_emit_with_read_bytes_limit_per_secondinreads_bytes_per_second w/ throttled alreadywas intermittently failing, especially on macOS CI runners.Ref. https://github.com/fluent/fluentd/actions/runs/31667602802/job/94345429056#step:6:5450
The
in_tailthrottling test must finish within a strict 1-second window before the timer (@start_reading_time) resets. Previously, the test appended logs for a fixed 0.8 seconds, leaving less than a 0.1-second margin. On loaded CI runners, this easily exceeded 1 second, causing the window to reset and unexpectedly emit pending logs.Docs Changes:
N/A
Release Note:
N/A