Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: ability for fork each test in a separate process and join the results. #3545

Closed
burtonator opened this issue Nov 2, 2018 · 2 comments
Labels
nice to have enhancement proposal of low priority status: wontfix typically a feature which won't be added, or a "bug" which is actually intended behavior

Comments

@burtonator
Copy link

Right now my mocha is locking up due to some setTimeout or other open resource in the code...

and I can't find out why.

I was using mocha-parallel-tests which forks for each test. But it's buggy and is skipping tests.

It would be KILLER if mocha could fork on each test, then collect the results so that timeouts and other issues didn't lock up my tests.

I realize that I should test for them, but right now that's not my priority. I don't want my test harness to lock up.

@plroebuck
Copy link
Contributor

plroebuck commented Nov 2, 2018

Try wtfnode to find open resources, or --exit to ignore the problem. Forking for each test would result in a massive speed hit. Since most users don't have a 1000-node compute cluster backing them up, it's not our priority to refactor to do that.

@plroebuck plroebuck added nice to have enhancement proposal of low priority status: wontfix typically a feature which won't be added, or a "bug" which is actually intended behavior labels Nov 2, 2018
@Xotabu4
Copy link

Xotabu4 commented Nov 16, 2018

@plroebuck
Hi, i did some experiments with new nodejs worker_threads, but unfortunately i have to spin full mocha instance in each worker and pass grep parameter to each worker to run only one test per thread. Also there are issues with existing reporters, test outputs. But CPU and RAM consumption is pretty low with workers, and already utilize all cores on host machine, which is nice.

https://github.com/Xotabu4/mochajs-multithread-workers

I can greatly improve this, if i could unblock mocha from sequential running tests one by one and just schedule everything, and wait for everything to complete.

Any advices would be helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nice to have enhancement proposal of low priority status: wontfix typically a feature which won't be added, or a "bug" which is actually intended behavior
Projects
None yet
Development

No branches or pull requests

3 participants