CI unit tests failure
See original GitHub issueDescribe the bug
events.js:292
throw er; // Unhandled 'error' event
^
Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed
at process.target.send (internal/child_process.js:705:16)
at Worker.send (internal/cluster/worker.js:46:10)
at ClusterWorker.sendToMainWorker (/home/runner/work/poolifier/poolifier/lib/worker/cluster-worker.js:21:282)
at ClusterWorker.checkAlive (/home/runner/work/poolifier/poolifier/lib/worker/abstract-worker.js:27:178)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
Emitted 'error' event on Worker instance at:
at process.<anonymous> (internal/cluster/worker.js:30:12)
at process.emit (events.js:315:20)
at processEmit [as emit] (/home/runner/work/poolifier/poolifier/node_modules/signal-exit/index.js:161:32)
at internal/child_process.js:709:35
at processTicksAndRejections (internal/process/task_queues.js:75:11) {
code: 'ERR_IPC_CHANNEL_CLOSED'
}
Steps to reproduce the behavior
Do a test PR on the repository
Expected behavior
Unit tests should work on GitHub CI GitHub shall not mark the unit tests run as successful
Info
Tool | Version |
---|---|
Poolifier | v2.x.x |
Node | v1x.x.x |
OS | linux |
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Fixing Tests in CI/CD: Why are Your Tests Failing?
There are multiple reasons to take failing tests seriously. First, failed tests can block the delivery of new releases, because the CI/CD ...
Read more >CICD - How To Resolve Failing Tests - Undo.io
Test failures are captured as a recording and stored as Jenkins artifacts. The recording captures the software failure, and provides all of the...
Read more >Unit test reports - GitLab Documentation
It is very common that a CI/CD pipeline contains a test job that verifies your code. If the tests fail, the pipeline fails...
Read more >Avoid Frequently Failing Tests With Continuous Integration
Software teams sometimes rely too much on unit testing and ignore functional and acceptance testing, which could lead to a working code but ......
Read more >How to Reduce Test Failures in CI/CD Pipelines? - Foresight
Developers are well aware of the importance of running multiple tests on their code, and in theory, a failed test is a good...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The issue were present on our unit tests, we were not using our pool methods to clean up the child processes, so when mocha terminated the tests the shutdown was not graceful. What we did is shutdown the cluster pools gracefully before to finish our test cases.
Issue should be now totally fixed, in future we should always destroy our pools after the tests to avoid similar issues.
I think that this is because we execute
worker.kill()
but we should first clear the interval.