Skip to content

Backport(v1.19): test_in_tail: fix flaky throttling test by allowing one extra watcher tick (#5489) - #5495

Merged
Watson1978 merged 1 commit into
v1.19from
backport-to-v1.19/pr5489
Sep 14, 2026
Merged

Watson1978 merged 1 commit into
v1.19from
backport-to-v1.19/pr5489

Conversation

@github-actions

Copy link
Copy Markdown

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

… 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 Watson1978 added the CI Test/CI issues label Sep 13, 2026
@Watson1978 Watson1978 added this to the v1.19.4 milestone Sep 13, 2026
@Watson1978
Watson1978 merged commit e9f2b33 into v1.19 Sep 14, 2026
21 checks passed
@Watson1978
Watson1978 deleted the backport-to-v1.19/pr5489 branch September 14, 2026 00:48
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