Project

General

Profile

Actions

action #98655

closed

Fix flaky coverage - lib/OpenQA/Worker/Job.pm size:M

Added by okurz over 2 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
Regressions/Crashes
Target version:
Start date:
2021-09-15
Due date:
% Done:

0%

Estimated time:

Description

Observation

https://github.com/os-autoinst/openQA/pull/4205 is a "dependency" update PR which should really be unrelated to coverage changes but there is a report about a coverage drop

lib/OpenQA/Worker/Job.pm    99.55% <0.00%> (-0.15%)     arrow_down

Acceptance criteria

  • AC1: The problematic code path is covered consistently

Suggestions

As the uncovered line is

sub settings                  { shift->{_settings} }
  • check where it should have been called an ensure it is called in tests.
  • check the code path to the settings for bugs, maybe it's not called correctly/reliably
  • mark the individual line as uncoverable? it doesn't look like e.g. an exit or busy loop, though (last resort)
Actions #1

Updated by livdywan over 2 years ago

  • Subject changed from Fix flaky coverage - lib/OpenQA/Worker/Job.pm to Fix flaky coverage - lib/OpenQA/Worker/Job.pm size:M
  • Description updated (diff)
  • Status changed from New to Workable
Actions #2

Updated by mkittler over 2 years ago

  • Assignee set to mkittler
Actions #3

Updated by mkittler over 2 years ago

  • Status changed from Workable to In Progress

sub settings { shift->{_settings} } is not covered according to the coverage report but there's no way that a full/successful test run would not execute that line. According to the coverage report, this line was also not covered before.

The line which has changed is actually log_error('Unable to make final image uploads. Maybe the web UI considers this job already dead.');; only this line has the info "Your changes would remove coverage for this line.". So that's what I will focus on in this ticket.

Actions #5

Updated by mkittler over 2 years ago

  • Status changed from In Progress to Feedback

The PR has been merged. By the way, the file has only two uncovered lines left. I guess it would make sense to add coverage for these right away as well.

Actions #6

Updated by okurz over 2 years ago

That would be great, yes

Actions #8

Updated by mkittler over 2 years ago

  • Status changed from Feedback to Resolved

Both PRs have been merged.

Actions

Also available in: Atom PDF