Meteor-Community-Packages / Meteor-Community-Packages/meteor-browser-tests

node processes are not ended correctly for nightmare

Open
#6 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
13
Forks
23
PR merge metrics
No merged PRs in 30d

Description

When I use nightmare (with [dispatch:mocha](https://github.com/DispatchMe/meteor-mocha)) on my system (MacOS `10.12.4`) in watch mode, there are lots of processes created.

This is how I start my tests:
```
TEST_BROWSER_DRIVER=nightmare meteor test --driver-package dispatch:mocha --port 3100
```
The first run starts an electron process
![first-run](https://cloud.githubusercontent.com/assets/3731059/25299411/20f46c24-26ff-11e7-93ba-c75e336777a0.jpg)
The second run starts a new one, but the forked node does not die:

![second_run](https://cloud.githubusercontent.com/assets/3731059/25299549/8c09ef4c-2700-11e7-8f16-f6b03e18967b.jpg)

With phantom, the forked node process dies when phantom dies.

Each time, electron is started a new node subprocess is forked which runs electron. When electron terminates, the node subprocess does not die. Over time, this adds a lot of pressure to the system.

This does not happen with phantomjs, therefore I assume that it may be a problem with this package.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the documented `meteor test --driver-package dispatch:mocha --port 3100` command with `TEST_BROWSER_DRIVER=nightmare` in watch mode on the reported setup, then inspect the Electron and forked Node process lifecycle across runs. Done means the forked Node process exits when Electron terminates, as it does with PhantomJS, without accumulating processes.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.