Skip to content

Backport(v1.19): test_in_tail: fix flaky test for already throttled log reading (#5474) - #5477

Merged
Watson1978 merged 1 commit into
v1.19from
backport-to-v1.19/pr5474
Aug 24, 2026
Merged

Backport(v1.19): test_in_tail: fix flaky test for already throttled log reading (#5474)#5477
Watson1978 merged 1 commit into
v1.19from
backport-to-v1.19/pr5474

Conversation

@github-actions

Copy link
Copy Markdown

Which issue(s) this PR fixes:
Backport #5474
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

**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 Watson1978 added this to the v1.19.4 milestone Aug 24, 2026
@Watson1978 Watson1978 added the CI Test/CI issues label Aug 24, 2026
@Watson1978
Watson1978 merged commit 577cbc7 into v1.19 Aug 24, 2026
21 checks passed
@Watson1978
Watson1978 deleted the backport-to-v1.19/pr5474 branch August 24, 2026 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Test/CI issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant