Skip to content

test: stabilize in_tail compatibility notification test - #5565

Merged
Watson1978 merged 2 commits into
masterfrom
in-tail-compatibility-test-watcher-race
Oct 23, 2026
Merged

Watson1978 merged 2 commits into
masterfrom
in-tail-compatibility-test-watcher-race

Conversation

@ashie

@ashie ashie commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Which issue(s) this PR fixes:

None.

What this PR does / why we need it:

The compatibility test can race with the stat watcher: after writing the
file, the watcher may call on_notify before the test's explicit call.
That consumes the test subclass's one-time false response, so the read
position has already advanced when the assertion runs.

Disable the stat watcher in this test so its explicit notifications control
the call order.

The failure reported by PR #5529 (GitHub Actions run 39210929391) is this
test-ordering instability, not a failure caused by the multithreading
implementation. The test uses the default synchronous mode, and this
stabilizes a compatibility test introduced by a separate refactoring.

Docs Changes:

None.

Release Note:

None; this only makes a test deterministic.

Assisted-by: LLM GPT-6 Luna (OpenAI)

Comment thread test/plugin/in_tail/test_compatibility.rb Outdated
ashie added 2 commits October 23, 2026 10:03
**Which issue(s) this PR fixes**:

None.

**What this PR does / why we need it**:

The compatibility test can race with the stat watcher: after writing the
file, the watcher may call on_notify before the test's explicit call.
That consumes the test subclass's one-time false response, so the read
position has already advanced when the assertion runs.

Disable the stat watcher in this test so its explicit notifications control
the call order.

The failure reported by PR #5529 (GitHub Actions run 39210929391) is this
test-ordering instability, not a failure caused by the multithreading
implementation. The test uses the default synchronous mode, and this
stabilizes a compatibility test introduced by a separate refactoring.

**Docs Changes**:

None.

**Release Note**:

None; this only makes a test deterministic.

Assisted-by: LLM GPT-6 Luna (OpenAI)
Signed-off-by: Takuro Ashie <ashie@clear-code.com>
Disabling the stat watcher still lets timer callbacks race with explicit notifications. Detach all of the tail watcher's triggers before writing the file so only the test drives on_notify.

Signed-off-by: Takuro Ashie <ashie@clear-code.com>
@ashie
ashie force-pushed the in-tail-compatibility-test-watcher-race branch from f384113 to 4bab47d Compare October 23, 2026 01:07

@Watson1978 Watson1978 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks

@Watson1978 Watson1978 added this to the v1.20.0 milestone Oct 23, 2026
@Watson1978 Watson1978 added the backport to v1.19 We will backport this fix to the LTS branch label Oct 23, 2026
@Watson1978
Watson1978 merged commit 2e85567 into master Oct 23, 2026
24 checks passed
@Watson1978
Watson1978 deleted the in-tail-compatibility-test-watcher-race branch October 23, 2026 01:40
@Watson1978 Watson1978 added the CI Test/CI issues label Oct 26, 2026
Watson1978 pushed a commit that referenced this pull request Oct 26, 2026
…est (#5565) (#5571)

**Which issue(s) this PR fixes**:
Backport #5565

None.

**What this PR does / why we need it**:

The compatibility test can race with the stat watcher: after writing the
file, the watcher may call on_notify before the test's explicit call.
That consumes the test subclass's one-time false response, so the read
position has already advanced when the assertion runs.

Disable the stat watcher in this test so its explicit notifications
control
the call order.

The failure reported by PR #5529 (GitHub Actions run 39210929391) is
this
test-ordering instability, not a failure caused by the multithreading
implementation. The test uses the default synchronous mode, and this
stabilizes a compatibility test introduced by a separate refactoring.

**Docs Changes**:

None.

**Release Note**:

None; this only makes a test deterministic.

Assisted-by: LLM GPT-6 Luna (OpenAI)

Signed-off-by: Takuro Ashie <ashie@clear-code.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Takuro Ashie <ashie@clear-code.com>
@github-actions github-actions Bot added the backported "backport to LTS" is done label Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport to v1.19 We will backport this fix to the LTS branch backported "backport to LTS" is done CI Test/CI issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants