karma-runner / grunt-karma

Grunt plugin for Karma.
MIT License
468 stars 116 forks source link

Use Node's built-in message channel for the background server #176

Closed MikeDimmick closed 8 years ago

MikeDimmick commented 8 years ago

After using client_process.fork, the parent and child processes can call send to fire a message event on the other side. This allows us to send arbitrary objects - such as a very large config - to the other process. This is more robust than communicating via stdin.

Since it's no longer necessary to redirect stdin, I have removed the silent option. This means the karma output appears in the console window/tty that grunt was run from. We might need a separate option to control whether the output goes to that console or to.

Tested on Node.js 4.2.4 and 0.12.1 on Windows 7 SP1 x64. Run grunt bgtest to test. I couldn't see an obvious way to automate testing, since the whole point is to launch karma in the background and leave it running.

I started looking into this due to issue #174.

googlebot commented 8 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


dignifiedquire commented 8 years ago

Thanks, this looks good to me, could you please

MikeDimmickMnetics commented 8 years ago

Sorry for the ongoing delay on this. Since I worked on this at work, I need to either get the CLA signed by the company or get them to release any claims on the changes. This is proving very very slow. If we decide to do it as a company, I should probably close this PR and create a new one under my work account (this account). If done as an individual I need to correct the commit author information to match my personal account.

MikeDimmick commented 8 years ago

Closing this pull request to resubmit under my work account.