Backport(v1.19): test_in_tail: fix flaky throttling test by allowing one extra watcher tick (#5489) - #5495
Merged
Conversation
… tick (#5489) **Which issue(s) this PR fixes**: Fixes # **What this PR does / why we need it**: The `lines collected with throttling` test still fails intermittently after #5381 and #5418, this time on the upper bound: [Ruby 3.3 on macOS CI](https://github.com/fluent/fluentd/actions/runs/34003950778/job/101426224818) measured 3.329s against a 3.32s limit. ``` 4) Failure: test: lines collected with throttling(TailInputTest::throttling logs at in_tail level): elapsed_seconds 3.329012749999947 is out of allowed range: lower: 0.6799999999999999 [sec] upper: 3.3200000000000003 [sec]. ``` Once the file has been written, retries depend mainly on the 1s watcher timer. A tick near the 2s rate-period boundary can arrive slightly too early, delaying the next read until the following tick. Local tracing confirmed read-start intervals of both approximately 2s and 3s. The existing 1.32s allowance covers both timer scheduling and read/observation latency. When an extra tick consumes 1s, only 0.32s remains for other delays—slightly less than this CI run needed. This PR adds one watcher interval to the upper bound, increasing it from 3.32s to 4.32s. The lower bound and record-count assertions remain unchanged. **Docs Changes**: N/A **Release Note**: N/A Signed-off-by: Shizuo Fujita <fujita@clear-code.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Watson1978
approved these changes
Sep 14, 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 #5489
Fixes #
What this PR does / why we need it:
The
lines collected with throttlingtest still fails intermittently after #5381 and #5418, this time on the upper bound: Ruby 3.3 on macOS CI measured 3.329s against a 3.32s limit.Once the file has been written, retries depend mainly on the 1s watcher timer. A tick near the 2s rate-period boundary can arrive slightly too early, delaying the next read until the following tick. Local tracing confirmed read-start intervals of both approximately 2s and 3s.
The existing 1.32s allowance covers both timer scheduling and read/observation latency. When an extra tick consumes 1s, only 0.32s remains for other delays—slightly less than this CI run needed.
This PR adds one watcher interval to the upper bound, increasing it from 3.32s to 4.32s. The lower bound and record-count assertions remain unchanged.
Docs Changes:
N/A
Release Note:
N/A