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

shell out to cucumber-js #25

Merged
merged 12 commits into from
Apr 29, 2016
Merged

shell out to cucumber-js #25

merged 12 commits into from
Apr 29, 2016

Conversation

guykisel
Copy link
Collaborator

@midniteio @efokschaner @vsiakka

This replaces the current fork + cucumber-js API approach with directly spawning a new process that shells out to cucumber-js. This way, if cucumber-js ends for any reason (crash, regular test failure, etc.) we'll still detect the process has exited and handle it properly.

env: workerEnv,
silent: !this.options.inlineStream
});
let cucumberPath = './node_modules/.bin/cucumber-js';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could also just run node . in node_modules/cucumber rather than having any windows logic.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think this actually works. cucumber.js in the module root isn't actually the module's CLI entry point.

@@ -11,6 +11,7 @@ import options from './fixtures/options';
describe('Test Handler', function() {
it('should wait for all children to exit before returning', function () {
var opts = options.default;
this.timeout(5000);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these waits needed?

Copy link
Collaborator Author

@guykisel guykisel Apr 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the default is 2 seconds, but on windows, starting cucumber-js is pretty slow and takes up to 3 or 4 seconds. (it's a test timeout, not a wait)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

return done(result);
})
.catch(function(err) {
return done({
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This object looks duped from the reject in worker?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So sometimes while I'm testing something in the worker breaks and throws an exception separately from the reject :-/

this.workers.push(worker);

return worker.execute()
.then(function(result) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the only two missed now I think

@midniteio
Copy link
Owner

👍

@midniteio midniteio merged commit 0cabdd8 into master Apr 29, 2016
@midniteio midniteio deleted the shell-out branch April 29, 2016 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants