-
Couldn't load subscription status.
- 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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,8 @@ use FindBin; | |
| use lib "$FindBin::Bin/../lib", "$FindBin::Bin/../../external/os-autoinst-common/lib"; | ||
| use OpenQA::Test::TimeLimit '50'; | ||
| use Mojo::IOLoop; | ||
| use Test::MockObject; | ||
|
|
||
| use OpenQA::Test::Utils 'perform_minion_jobs'; | ||
| use OpenQA::Test::ObsRsync 'setup_obs_rsync_test'; | ||
|
|
||
|
|
@@ -124,4 +126,14 @@ subtest 'test lock after failure' => sub { | |
| lock_test(); | ||
| }; | ||
|
|
||
| subtest 'Finish job when retry count exceeded' => sub { | ||
| 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 commentThe reason will be displayed to describe this comment to others. Learn more. I think this doesnt make sense. Because you set |
||
| OpenQA::WebAPI::Plugin::ObsRsync::Task::_retry_or_finish($job, undef, undef, 1, 1); | ||
|
|
||
| like $finish_return->[0]{message}, qr/Exceeded retry count \d+\. Consider job will be re-triggered later/; | ||
| }; | ||
|
|
||
| done_testing(); | ||
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?