question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CI unit tests failure

See original GitHub issue

Describe 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:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
pioardicommented, Feb 18, 2021

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.

1reaction
pioardicommented, Feb 17, 2021

I think that this is because we execute worker.kill() but we should first clear the interval.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found