-
Notifications
You must be signed in to change notification settings - Fork 219
Partial cover OpenQA::WebAPI::Plugin::ObsRsync::Task #6777
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
base: master
Are you sure you want to change the base?
Partial cover OpenQA::WebAPI::Plugin::ObsRsync::Task #6777
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6777 +/- ##
=======================================
Coverage 99.25% 99.26%
=======================================
Files 402 402
Lines 41268 41276 +8
=======================================
+ Hits 40961 40971 +10
+ Misses 307 305 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Failing due to: https://progress.opensuse.org/issues/189384 |
| lock_test(); | ||
| }; | ||
|
|
||
| subtest 'Finish job when retry count exceeded' => sub { |
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.
sorry
if you check the other descriptions, all start with low case. Could you adjust this as well?
| use_ok('OpenQA::WebAPI::Plugin::ObsRsync::Task'); | ||
| my $finish_return; | ||
| my $job = Test::MockObject->new->mock('retries', sub { 42 })->set_true('retry')->set_true('finish') | ||
| ->mock('finish', sub { shift; $finish_return = [@_]; return 1 }); |
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.
I think this doesnt make sense. Because you set finish to true and right after you mock it again.
In additional I do not think you need the set_true('retry'). AFAIU $job->retry it wont run based on the arguments ($job, undef, undef, 1, 1). $retry_max_count is true (aka false due to negation) and I think $job->retries < $retry_max_count is also false with those values.
Reference: https://progress.opensuse.org/issues/178948