Skip to content
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

[testing] investigate coverage inconsistency. #14756

Closed
dixler opened this issue Dec 5, 2023 · 0 comments · Fixed by #14777
Closed

[testing] investigate coverage inconsistency. #14756

dixler opened this issue Dec 5, 2023 · 0 comments · Fixed by #14777
Assignees
Labels
area/testing kind/engineering Work that is not visible to an external user resolution/fixed This issue was fixed
Milestone

Comments

@dixler
Copy link
Contributor

dixler commented Dec 5, 2023

What happened?

Pulumi CodeCov reports still fluctuate across runs.

source_query.go is reported with 0% coverage despite the following tests https://github.com/pulumi/pulumi/blob/0b250fcf2a881aa1e73582e6e477749d31af9062/pkg/resource/deploy/source_query_test.go

I suspect gotestyourself/gotestsum#274 is the culprit as gotestsum re-runs failed tests and prior passed tests are ignored.

Example

https://github.com/pulumi/pulumi/actions/runs/7100733481/job/19327776558

CI / Unit Test / pkg 2/7 on ubuntu-latest/current

DONE 2 runs, 852 tests, 9 skipped, 9 failures in 670.888s

CodeCov report (0% source_query.go)
https://app.codecov.io/github/pulumi/pulumi/commit/0b250fcf2a881aa1e73582e6e477749d31af9062/blob/pkg/resource/deploy/source_query.go

Output of pulumi about

n/a

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@dixler dixler added area/testing kind/engineering Work that is not visible to an external user labels Dec 5, 2023
@dixler dixler added this to the 0.97 milestone Dec 5, 2023
@dixler dixler self-assigned this Dec 5, 2023
@dixler dixler changed the title investigate coverage inconsistency. [testing] investigate coverage inconsistency. Dec 5, 2023
github-merge-queue bot pushed a commit that referenced this issue Dec 8, 2023
Fixes #14756

Flaky tests cause coverage to be rerun and drops coverage data making
CodeCov data less reliable/usable.

One of the most commonly flaky tests is
`TestCreatingProjectWithEmptyConfig` in `pkg` which contains a large
number of tests.

Moving this test to the top of the file appears to lead to less
flakiness.
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing kind/engineering Work that is not visible to an external user resolution/fixed This issue was fixed
Projects
None yet
2 participants