-
-
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
error code 0 on successful --retry
#1121
Conversation
Thanks @gondalez! If you can rebase this off of master I'll help figure out what's breaking in jruby. |
- Updated configuration to count the base number of cases being run - Updated failure? method to use cases.total_passed and total_cases to determine if the run was successful
87b8662
to
8174b73
Compare
@danascheider no probs; rebase is done and the jruby build passed this time 🎉 |
lib/cucumber/runtime.rb
Outdated
@@ -228,6 +228,12 @@ def legacy_formatter?(factory) | |||
def failure? | |||
if @configuration.wip? | |||
summary_report.test_cases.total_passed > 0 | |||
elsif @configuration.retry_attempts > 0 | |||
unless summary_report.test_cases.total_passed != @configuration.total_cases |
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.
Golfing the code:
- an
unless
with!=
could become anif
with a==
Would that read better?
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.
@olleolleolle 👍 fixed :)
As I commented on the original PR, I think the exit code should be non-zero in |
@brasmusson That makes sense. I like the idea of a new category. |
Superseded by cucumber/cucumber-ruby-core#141 and #1159. |
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
A basic working version of --retry based on work by @streetlogics, in the time I had available.
The logging could use some work and it would be nice to get feedback from the maintainers.
I figured I would put this here in case it helps someone else out and maybe it can go part-way towards a fix for #1044 :)
Details
I cherry picked the commits master...streetlogics:issue/retry-success-exit-code-0-1044 on top of master.
See #1044 (comment).
Motivation and Context
I tried using @streetlogics branch but I got an ArgumentError when a feature is retried.
This seems to have been fixed by 31968ae, that was not yet in the remote branch.
How Has This Been Tested?
I tested quickly locally and can confirm the error code is now 0 if a step succeeds on subsequent retry.