Skip to content

🙈 Update coverage ignore statements for race conditions#408

Merged
wwilsman merged 1 commit intomasterfrom
ww/ignore-flakey-coverage
Jul 15, 2021
Merged

🙈 Update coverage ignore statements for race conditions#408
wwilsman merged 1 commit intomasterfrom
ww/ignore-flakey-coverage

Conversation

@wwilsman
Copy link
Copy Markdown
Contributor

@wwilsman wwilsman commented Jul 9, 2021

What is this?

Sometimes, we get an occasional flakey CI failure due to missing branch coverage, which doesn't highlight which line number the coverage was missed for in the CI summary.

The reason that coverage is flakey but tests pass is likely due to a close enough assertion. For example, a test that asserts the page was closed might test for /closed/ because sometimes the message is Browser closed instead of Page closed (both messages mean the page is closed, so the test is still accurate).

All page/browser errors are handled in one of two places, and the resulting handling and desired outcome is the same. There was already a coverage ignore statement on one handler, and another nested within the second handler. Both ignore statements were adjusted to reflect that they race with one another.

Another possible solution here would be to pull out this error handling into a shared function. That way it wouldn't matter which browser/page method handled the error since the same coverage paths would be taken in either case. I didn't do that now since there was already coverage ignore statements in these places and it was quicker to adjust them.

@wwilsman wwilsman added the 🧹 maintenance General maintenance label Jul 9, 2021
@wwilsman wwilsman requested a review from Robdel12 July 9, 2021 18:40
@wwilsman wwilsman enabled auto-merge (squash) July 13, 2021 15:22
Copy link
Copy Markdown
Contributor

@Robdel12 Robdel12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏁 Happy day when windows coverage no longer trolls us

@wwilsman wwilsman merged commit 8ee599a into master Jul 15, 2021
@wwilsman wwilsman deleted the ww/ignore-flakey-coverage branch July 15, 2021 15:40
samarsault pushed a commit that referenced this pull request Mar 3, 2023
Bumps [@percy/core](https://github.com/percy/cli/tree/HEAD/packages/core) from 1.0.0-beta.65 to 1.0.0-beta.67.
- [Release notes](https://github.com/percy/cli/releases)
- [Commits](https://github.com/percy/cli/commits/v1.0.0-beta.67/packages/core)

---
updated-dependencies:
- dependency-name: "@percy/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧹 maintenance General maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants