test: print call checks when a test times out
The mustCall
failures when a test times out are not printed because
the test runner kills the node process, so the runCallChecks
never
prints anything. This failures can provide very useful information when
investigating flaky tests.
One solution could be adding a signal handler, but this solution would
not work on Windows
.
Another option, implemented in this commit, is creating a pipe between
the test runner and the test process so when the test runner considers
that a test has timed out, it sends a message to the test process using
this pipe so it can exit gracefully printing the mustCall
failures.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines
Affected core subsystem(s)
test