-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix flaky mutants #2717
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
Fix flaky mutants #2717
Conversation
Fix flaky mutants after task refactoring in #2664.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses flaky mutants in the Polly.Core circuit breaker controller by adding Stryker mutation testing exclusions. The changes disable mutation testing for specific conditional checks that are difficult to test reliably.
- Added Stryker disable comments for two conditional checks
- Prevents flaky mutation test failures for code paths that are hard to test deterministically
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2717 +/- ##
=======================================
Coverage 96.12% 96.12%
=======================================
Files 309 309
Lines 7118 7118
Branches 1008 1008
=======================================
Hits 6842 6842
Misses 222 222
Partials 54 54
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
Isn't the |
|
They are, but I've seen two different failing mutations since the merge. Line 23 in 0159145
|
|
Oh, I think the reason is because |
|
This condition might also be flaky then:
Though I'm surprised that the similar condition below for if (completedTask == delayTask) doesn't seem to be flaky...
|
|
I'd be happy to accept a PR to tweak our configuration to do the same and then revert these changes so the conditions are mutated again. I'm going to merge this now though as 4-in-a-row failures in main and 3-in-a-row successes here suggests the flaky CI is at least resolved for now (🤞). |
|
It's actually in the config already, so now I don't know why it was flaky: Line 15 in 0159145
|
|
Just had another one happen here:
|
Fix flaky mutants after task refactoring in #2664.