test: synchronize interrupt tests on observable state, not fixed sleeps#62385
Merged
Conversation
Addresses post-merge review of the interrupt tests added in JuliaLang#62069: the "SIGINT at idle REPL prompt", "SIGINT during REPL evaluation of a sleep loop", and "Distributed.interrupt reaches a busy worker" testsets used fixed `sleep`s to guess when the target process was ready to receive the signal, which is unsound on loaded CI machines and was failing there (https://buildkite.com/julialang/julia-pr/builds/362#_). Apply the same approach as the fix for the fourth testset in JuliaLang#62298: synchronize on output round-trips through user code before signaling, and make the post-signal assertions independent of timing by retrying the aliveness round-trip (SIGINT aborts an in-flight REPL input line) and synchronizing on the sleep loop's own output. For the Distributed test, delivery on the worker is timing-sensitive (the InterruptException lands in whichever task last parked in the scheduler, which may be the message loop, killing the worker), so retry with a fresh worker up to three times; a swallowed interrupt is a hard failure regardless. Capture the subprocess output and report it when the test fails. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
vtjnash
approved these changes
Jul 14, 2026
On a loaded machine a single SIGINT delivered right after the loop starts can be missed, so the InterruptException never surfaces and the REPL stays busy in the loop. Resend the signal until the exception is observed. Fixes CI failure on macOS x86: JuliaLang#62069 test/misc.jl SIGINT during REPL evaluation of a sleep loop Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Member
Author
Member
Author
|
I think the issue was JuliaLowering_stdlibs running in parallel #62392 |
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.

Followup to fix flaky tests from #62069
Re. #62069 (comment)