Skip to content

Move post-spawn wait into the spec that needs it#1514

Merged
unflxw merged 1 commit into
mainfrom
move-runner-post-spawn-wait
May 20, 2026
Merged

Move post-spawn wait into the spec that needs it#1514
unflxw merged 1 commit into
mainfrom
move-runner-post-spawn-wait

Conversation

@unflxw
Copy link
Copy Markdown
Contributor

@unflxw unflxw commented May 19, 2026

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.

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.
@unflxw unflxw requested review from Copilot, lipskis and tombruijn May 19, 2026 16:50
@unflxw unflxw self-assigned this May 19, 2026
@unflxw unflxw added the dev happiness Issues that improve developer happiness once they are resolved. label May 19, 2026
@backlog-helper
Copy link
Copy Markdown

Hi @unflxw,

We've found some issues with your Pull Request.

  • This Pull Request does not include a changeset. Add a changeset if the change impacts users and should be included in the changelog upon release. Read more about changesets.
    Ignore this rule by adding [skip changeset] to your Pull Request body. - (More info)

New issue guide | Backlog management | Rules | Feedback

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_spec immediately before signaling the child, to avoid USR1 arriving before Signal.trap is 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.

@unflxw unflxw merged commit 871e467 into main May 20, 2026
198 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev happiness Issues that improve developer happiness once they are resolved.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants