-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Make --fail-fast play nice with --retry #1283
Conversation
lib/cucumber/formatter/fail_fast.rb
Outdated
@@ -9,7 +9,7 @@ class FailFast | |||
def initialize(configuration) | |||
configuration.on_event :test_case_finished do |event| | |||
_test_case, result = *event.attributes | |||
Cucumber.wants_to_quit = true unless result.ok?(configuration.strict) | |||
Cucumber.wants_to_quit = !result.ok?(configuration.strict) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since Cucumber.wants_to_quit
is global and may be set to true
by other components than the FailFast
formatter, I think that it should only set Cucumber.wants_to_quit
to false when it is sure that it is a flaky test that have passed.
Hi @yrral86, Thanks for your making your first contribution to Cucumber, and welcome to the Cucumber committers team! You can now push directly to this repo and all other repos under the cucumber organization! 🍾 In return for this generous offer we hope you will:
On behalf of the Cucumber core team, |
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. |
Summary
When running with --fail-fast and --retry, the first failure causes Cucumber to want_to_quit. This changes resets that flag to false if the scenario succeeds on retry.
How Has This Been Tested?
See changes to retry_failing_tests.feature
Types of changes
Checklist: