action #96519
closedFix flaky coverage - lib/OpenQA/Scheduler.pm size:M
Description
Observation¶
It seems we were just there to have stable coverage but now we have seen flaky coverage in other places again, e.g. in https://github.com/os-autoinst/openQA/pull/4103 mentions lib/OpenQA/Scheduler.pm 98.14% <0.00%> (-1.86%)
. I suspect one of
- https://github.com/os-autoinst/openQA/pull/4072
- https://github.com/os-autoinst/openQA/pull/4095
- https://github.com/os-autoinst/openQA/pull/4096
Acceptance criteria¶
- AC1: Stable 100% coverage for lib/OpenQA/Scheduler.pm
Suggestion¶
- Mark offending code as not coverable e.g.
# uncoverable statement
- Trigger manual coverage collection in the
sub
- Look into https://app.codecov.io/gh/os-autoinst/openQA/compare/4103/changes
# check for stale jobs every 2 minutes
Mojo::IOLoop->recurring(
120 => sub {
OpenQA::Scheduler::Model::Jobs->singleton->incomplete_and_duplicate_stale_jobs;
});
Updated by okurz over 3 years ago
https://github.com/os-autoinst/openQA/pull/4106 is a good example of a spec file change that still shows coverage change in lib/OpenQA/Scheduler.pm
Updated by livdywan over 3 years ago
- Subject changed from Fix flaky coverage - lib/OpenQA/Scheduler.pm to Fix flaky coverage - lib/OpenQA/Scheduler.pm size:M
- Description updated (diff)
- Status changed from New to Workable
Updated by okurz over 3 years ago
- Copied to action #97046: Fix flaky coverage - t/05-scheduler-full.t size:M added
Updated by kraih over 3 years ago
As far as i can see only 33-developer_mode.t
actually starts a scheduler in a way that can result in coverage of the timer. So i'll focus my testing there for now.
Updated by kraih over 3 years ago
Ended up going back to the simplest solution. https://github.com/os-autoinst/openQA/pull/4134
Updated by openqa_review over 3 years ago
- Due date set to 2021-09-04
Setting due date based on mean cycle time of SUSE QE Tools
Updated by mkittler over 3 years ago
- Status changed from In Progress to Resolved
The PR has been merged. It looks simple enough so I mark the ticket as resolved.