From 28015000f181e24b5d186599a5419536c5576053 Mon Sep 17 00:00:00 2001 From: Takuro Ashie Date: Fri, 23 Oct 2026 10:40:16 +0900 Subject: [PATCH] test: stabilize in_tail compatibility notification test (#5565) **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 Signed-off-by: github-actions[bot] --- test/plugin/in_tail/test_compatibility.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/plugin/in_tail/test_compatibility.rb b/test/plugin/in_tail/test_compatibility.rb index 1a166b6550..4f55d68ab8 100644 --- a/test/plugin/in_tail/test_compatibility.rb +++ b/test/plugin/in_tail/test_compatibility.rb @@ -425,6 +425,8 @@ def test_receive_lines_returning_false_does_not_advance_the_position plugin = d.instance d.run do tw = first_watcher(plugin) + # Only explicit notifications should drive this test, without stat or timer callbacks. + tw.watchers.each { |trigger| plugin.event_loop_detach(trigger) } File.binwrite("#{@tmp_dir}/tail.txt", "test1\ntest2\n") tw.on_notify