Skip to content

test_in_tail: fix flaky worker unwatch test by disabling the periodic refresh - #5599

Merged
ashie merged 1 commit into
fluent:masterfrom
Watson1978:test-in-tail-unwatch-refresh
Nov 8, 2026
Merged

ashie merged 1 commit into
fluent:masterfrom
Watson1978:test-in-tail-unwatch-refresh

Conversation

@Watson1978

Copy link
Copy Markdown
Contributor

Which issue(s) this PR fixes:
None.

What this PR does / why we need it:
test_worker_completion_drains_file_during_unwatch (added in #5529) unwatches the file, but the file still matches path. The periodic refresh finds it again and reads it from the head, so the line is emitted twice if the test runs longer than about one second. It passes now only because the test usually ends before the first refresh.

The neighboring rotation test sets refresh_interval 1h and rotate_wait 1s, but they are not applied. create_driver(config) puts the common config on the left of +, and the left side wins. So both tests run with refresh_interval 1s and rotate_wait 2s. This PR configures both tests without the common config and sets refresh_interval 1h for the unwatch test as well.

Docs Changes:
None.

Release Note:
None. This only fixes the tests.

🤖 Generated with Claude Code

… refresh

test_worker_completion_drains_file_during_unwatch unwatches the file,
but the file still matches path. The periodic refresh finds it again
and reads it from the head, so the line is emitted twice if the test
runs longer than about one second.

create_driver(config) puts the common config on the left of +, and the
left side wins. So the refresh_interval and rotate_wait of the
neighboring rotation test were not applied either. Configure both tests
without the common config.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
@Watson1978 Watson1978 added this to the v1.21.0 milestone Nov 6, 2026
@Watson1978 Watson1978 added the CI Test/CI issues label Nov 6, 2026
@Watson1978
Watson1978 requested a review from ashie November 6, 2026 03:46

@ashie ashie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ashie
ashie merged commit 6528560 into fluent:master Nov 8, 2026
20 checks passed
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.

2 participants