Coverage Issue - New Using + Async/Await + ConfigureAwait
See original GitHub issuefound during #649, this combination of code seems to have incorrect reports
public async Task<ActionResult<IEnumerable<SystemUserItem>>> SystemUsers(CancellationToken ct)
{
using var data = this.factory.CreateReadOnly<SystemUserItem>();
var list = await data.AllAsync(ct)
.ConfigureAwait(false);
return this.Ok(list);
}
here is the final report output:
here is the diff of the coverage xml:
left side = unit test - code is not executed right side = integration test - code is there doesnt appear to be any branches - all code execute under a single call
Issue Analytics
- State:
- Created 4 years ago
- Comments:21
Top Results From Across the Web
Coverage Issue - New Using + Async/Await + ConfigureAwait
Guys I found the issue...I'PR a fix asap. Are two different issue, one related to netstandard project and the other related on new...
Read more >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 >Why I no longer use ConfigureAwait(false)
In this case, I believe that using ConfigureAwait(false) for the ... var tcs = new TaskCompletionSource(); var task = SomeAsync(() => tcs.
Read more >Async, Await, and ConfigureAwait – Oh My!
ConfigureAwait (false) on every async call through the entire call stack! If you don't, you'll end up with another deadlock. The problem here...
Read more >When to use ConfigureAwait(false)? : r/csharp
No, it means “do await, but don't continue on the context”. I could've sworn there was an issue about improving this API, but...
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 FreeTop 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
Top GitHub Comments
Guys I found the issue…I’PR a fix asap. Are two different issue, one related to netstandard project and the other related on new async machine state code.
Adding a script that moves the files was a good call, I got it working and the problems with new using and async/await with ConfigureAwait disappeared 😃
For future reference if anyone encounters the problem, take a look at the relevant files below.
build.yml
(GitHub Workflow)ApodTests.csproj
.runsettings
in the root test folder (withApodTests.csproj
)And finally, the
NuGet.Config
in the root solution folderI’m back to 100% 😃 Thank you for the help @MarcoRossignoli!