Skip to content

Conversation

@mrazauskas
Copy link
Contributor

Summary

Long story short, I was playing with a custom runner by adapting the code from Jest repo. As always I tried to understand how it works. All was more or less clear except the if (err.type === 'ProcessTerminatedError') part. What is this error? Is it originating from the worker, or child process, or Node in general? Seems like not.

Searching around points to worker-farm library which has ProcessTerminatedError. The worker-farm was introduced with #540 and remove in #4825. if (err.type === 'ProcessTerminatedError') got added with worker-farm, but was not removed later.

Perhaps there is something I missed, but it seems like if (err.type === 'ProcessTerminatedError') does nothing and can be safely removed. Or?

Test plan

All test should pass.

@codecov-commenter
Copy link

codecov-commenter commented Feb 1, 2022

Codecov Report

Merging #12287 (e9d6598) into main (5f71f86) will increase coverage by 0.00%.
The diff coverage is 63.63%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #12287   +/-   ##
=======================================
  Coverage   67.51%   67.51%           
=======================================
  Files         328      328           
  Lines       17246    17237    -9     
  Branches     5071     5065    -6     
=======================================
- Hits        11643    11638    -5     
+ Misses       5570     5566    -4     
  Partials       33       33           
Impacted Files Coverage Δ
packages/jest-runner/src/index.ts 64.28% <63.63%> (+0.84%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5f71f86...e9d6598. Read the comment docs.

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

I think your analysis is correct 🙂

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

thanks!

@mrazauskas
Copy link
Contributor Author

I force-pushed just to restart CI.

@SimenB SimenB merged commit 1614524 into jestjs:main Feb 1, 2022
@mrazauskas mrazauskas deleted the remove-ProcessTerminatedError branch February 1, 2022 15:47
@github-actions
Copy link

github-actions bot commented Mar 4, 2022

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants