Skip to content

Conversation

@Wabri
Copy link
Member

@Wabri Wabri commented Sep 26, 2025

@Wabri Wabri self-assigned this Sep 26, 2025
@Wabri Wabri changed the title Cover OpenQA::WebAPI::Plugin::ObsRsync::Task Partial cover OpenQA::WebAPI::Plugin::ObsRsync::Task Sep 26, 2025
@codecov
Copy link

codecov bot commented Sep 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.26%. Comparing base (e5c0222) to head (5c18607).
⚠️ Report is 80 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Wabri
Copy link
Member Author

Wabri commented Sep 26, 2025

Failing due to: https://progress.opensuse.org/issues/189384

lock_test();
};

subtest 'Finish job when retry count exceeded' => sub {
Copy link
Contributor

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 });
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants