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

Cli.run callback is not called when cucumber-js itself fails #565

Closed
efokschaner opened this issue Apr 25, 2016 · 3 comments
Closed

Cli.run callback is not called when cucumber-js itself fails #565

efokschaner opened this issue Apr 25, 2016 · 3 comments

Comments

@efokschaner
Copy link
Contributor

efokschaner commented Apr 25, 2016

This issue repro's when another issue such as this one occurs #564

See problem 2 in https://github.com/efokschaner/cucumber-js-fails-when-step-error-is-not-exception for a full write up, summarized here:

When cucumber-js has an internal error, it does not call the callback passed to Cli.run, leaving the caller unaware of failure. With blocking or callback steps this causes an unhandled exception. With Promise steps, this causes an unhandled rejection, which is not fatal and can leave the program hanging. As an example of real impact, this affects the following project: https://github.com/midniteio/multi-cuke/blob/v0.6.5/src/lib/worker.js where it performs multiple cucumber.Cli runs in forked node processes to parallelise testing. When the unhandled rejection occurs the worker does not know that cucumber has stopped executing.

@charlierudolph
Copy link
Member

Thank you for the excellent write up! I actually ran into problem 1 for the first time today, and am good with your proposed solution. Problem 2 is quite tough to deal with, I like the idea of switching to promises

@charlierudolph charlierudolph added this to the 2.0 release milestone Sep 21, 2016
@charlierudolph
Copy link
Member

In 2.0.0-rc.1 cucumber cli.run now returns a promise which resolves with a boolean and rejects if there is an internal error.

@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants