test coverage recording is flaky

Bug #2050838 reported by Samuel Allan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sunbeam Charms
Fix Committed
Undecided
Samuel Allan

Bug Description

stestr runs in parallel and coverage is only picking up coverage data from one process. I think the solution is to use --parallel-mode for coverage.

Tags: in-main
Changed in sunbeam-charms:
assignee: nobody → Samuel Allan (swalladge)
assignee: Samuel Allan (swalladge) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to sunbeam-charms (main)
Revision history for this message
Samuel Allan (samuelallan) wrote :

I tested with coverage and we definitely need --parallel-mode. I opened the above patch to add it.

On current main, with 5 test runs of `tox -e cover`, the missing line counts vary:

```
31779
31813
31848
31864
31873
```

With the above patch, the missing line count is reduced and consistent between runs:

```
31405
31405
31405
31405
31405
```

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to sunbeam-charms (main)

Reviewed: https://review.opendev.org/c/openstack/sunbeam-charms/+/906335
Committed: https://opendev.org/openstack/sunbeam-charms/commit/caabd67022efb5b9f18e952c72cf9d3bb64b84b6
Submitter: "Zuul (22348)"
Branch: main

commit caabd67022efb5b9f18e952c72cf9d3bb64b84b6
Author: Samuel Allan <email address hidden>
Date: Tue Jan 23 15:35:28 2024 +1030

    Use --parallel-mode for test coverage

    stestr runs in parallel, which is good, but coverage needs to run
    in parallel awareness mode, so that data from all stestr processes
    is collected.

    Closes-Bug: #2050838

    Change-Id: I6a384f07d5063dc42b63943586d499f7647b1c64

tags: added: in-main
Changed in sunbeam-charms:
status: New → Fix Committed
assignee: nobody → Samuel Allan (swalladge)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.