Should not be a mutant for ConfigureAwait(false)
See original GitHub issueWe have various async code in our libraries like:
await doSomething(context).ConfigureAwait(false);
Stryker-mutator change the false flag to true but most of the time it’s for UnitTest purpose not interesting to change the flag to true.
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
c# - Why is writing ConfigureAwait(false) on every line with ...
As a general rule, yes. ConfigureAwait(false) should be used for every await unless the method needs its context.
Read more >.NET: Don't use ConfigureAwait(false) | Gabe's Code
As a general rule, ConfigureAwait(false) should be used for every await unless the method needs its context. It's even what Stephen Cleary (a ......
Read more >Why I no longer use ConfigureAwait(false)
ConfigureAwait(false) is about not returning back to the synchronization context when an awaiter completes. It's about performance, not ...
Read more >Configuration | Stryker Mutator
All other mutants will not have a result. If you wish to test only changed sources and tests but would like to have...
Read more >Performance Best Practices | Couchbase Docs
If your application is consistently sending mutation operations larger than this value, increasing the value may improve performance at the cost of RAM ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We could check the name of a method before mutating it’s arguments. However we can’t be sure that if the name is
ConfigureAwait
it is an async configuration. If we exclude this method (or maybe even more) we could also exclude methods that should be mutated. How do you think we should handle this?I have a working version under: https://github.com/anhaehne/stryker-net/commit/d73425afae78d21fa30cfeab640b7defbbc3ea78
The actual method filter logic is implemented here: https://github.com/anhaehne/stryker-net/blob/master/src/Stryker.Core/Stryker.Core/MutantFilters/IgnoredMethodMutantFIlter.cs
Console output could look something like this: