Skip to content

Conversation

@9aoy
Copy link
Contributor

@9aoy 9aoy commented Oct 30, 2025

Summary

should catch process.kill error correctly.

before:
img_v3_02ri_0848c59e-11eb-462c-be3d-4f67cbc17b6g

after:
img_v3_02ri_2a69c1ec-1060-47e8-bd78-8bb22376a81g

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings October 30, 2025 08:33
@netlify
Copy link

netlify bot commented Oct 30, 2025

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit ca7d868
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/690342403618aa00082a347d
😎 Deploy Preview https://deploy-preview-660--rstest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

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 adds protection against test code accidentally killing the worker process by intercepting process.kill calls. Similar to the existing process.exit interceptor, this change throws an error when tests attempt to kill the current process, preventing unexpected worker termination.

Key changes:

  • Added process.kill override that throws an error when targeting the current process ID
  • Updated test to verify the new error handling behavior
  • Refactored test assertions to use helper functions (expectExecFailed, expectLog)

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/core/src/runtime/worker/index.ts Intercepts process.kill calls targeting the current process and throws descriptive errors
e2e/runner/test/processKill.test.ts Updated test assertions to verify process.kill interception and use helper functions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@9aoy 9aoy merged commit a117cd5 into main Oct 30, 2025
15 checks passed
@9aoy 9aoy deleted the avoid-worker-exited-unexpectedly branch October 30, 2025 11:22
@9aoy 9aoy mentioned this pull request Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants