Fix flaky specs on TruffleRuby - #605
Merged
rymai merged 3 commits intoOct 1, 2026
Merged
Conversation
houndci-bot
reviewed
Oct 1, 2026
Member
|
@andrykonchin Thanks, LGTM! ❤️ |
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.
What/Why
CI fails sporadically on TruffleRuby because background threads are stopped asynchronously, causing different test cases to interfere with one another.
Changes:
The new test failure is caused by a background thread invoking un-stubbed methods on test doubles. Whether these methods get called depends on thread scheduling and how quickly the test finishes. Preventing the background thread from running resolves the issue. This is appropriate because the background thread execution is not what this test verifies (it only checks watch event setup). The alternative -stubbing every method the background thread might invoke on test doubles - would be fragile and sub-optimal.
Actually waiting for threads (the 1st commit) isn't strictly needed to stabilize the current tests on TruffleRuby (because no thread is running in the Linux adapter unit tests anymore), but keeping synchronous thread termination ensures test cases remain properly isolated if similar background thread usage is introduced in the future.
Based on PR that was merged and rolled back #597.
New failure details
CI job logs