Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: fix test-child-process-fork-net
The child processes are supposed to get 4 messages (2 ends, 2 writes). Previously the mustCall() wrapping the message listener attempts to match exactly 1 invocation which is bound to fail but could be swallowed if the child happens to be killed before the exit event is fired for the mustCall() check to work. In the CI, on some machines the kill() could happen after the child process finishes with the mustCall() check, resulting in EPERM errors in kill(). This patch fixes the mustCall() checks (updating the expected invocation count to 4) and swallow the errors when kill() fails, which should be fine because they are only there for cleanup. PR-URL: nodejs#51841 Refs: nodejs#51813 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
- Loading branch information