Move post-spawn wait into the spec that needs it#1514
Merged
Conversation
The unconditional sleep in the test runner exists so a spec can interact with a still-booting child (sending USR1 in stop_spec). Other specs that only wait for the child to exit pay the wait for no reason. Move it into stop_spec where the signal is sent, so the runner stays minimal.
|
Hi @unflxw, We've found some issues with your Pull Request.
|
There was a problem hiding this comment.
Pull request overview
This PR optimizes the integration test runner by removing an unconditional post-spawn sleep and applying the wait only in the specific spec that needs the child process to be partially booted (so it can reliably receive a USR1 signal after installing its trap).
Changes:
- Removed the unconditional post-spawn sleep from
Runner#run, keeping the runner minimal for specs that don’t need it. - Added a targeted sleep in
stop_specimmediately before signaling the child, to avoidUSR1arriving beforeSignal.trapis installed (especially relevant on JRuby).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| spec/integration/stop_spec.rb | Adds a targeted boot/trap installation wait before sending USR1 to the spawned child process. |
| spec/integration/runner.rb | Removes unconditional post-spawn wait so other specs don’t pay unnecessary startup delay. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tombruijn
approved these changes
May 20, 2026
lipskis
approved these changes
May 20, 2026
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.
The unconditional sleep in the test runner exists so a spec can interact with a still-booting child (sending USR1 in stop_spec). Other specs that only wait for the child to exit pay the wait for no reason. Move it into stop_spec where the signal is sent, so the runner stays minimal.