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

Incorrect branch coverage with .NET 472 #1167

Closed
alessandroste opened this issue May 21, 2021 · 2 comments · Fixed by #1169
Closed

Incorrect branch coverage with .NET 472 #1167

alessandroste opened this issue May 21, 2021 · 2 comments · Fixed by #1169
Assignees
Labels
bug Something isn't working

Comments

@alessandroste
Copy link

I am having issues with the branch coverage on a .NET 472 based project. In particular some awaited methods result in two or more branches in the coverage report. I was able to reproduce on a small scale here. The project on .NET standard looks good, but the project on .NET 472 results in some suspicious behavior.
The class is exactly the same, but the coverage is different.
image
image
The await on the semaphore await this.semaphore.WaitAsync(); results in two branches for .NET 472 and one branch for .NET standard, and the same happens to await Task.Delay(TimeSpan.FromMilliseconds(1));. In the second case, both the branches are visited, but, in the first case, only one is visited. This is probably related to the state machine of the task framework.
Is this something that can be solved on coverlet side? I tested with versions back to 3.0.1 and I see the same behavior.

@daveMueller daveMueller self-assigned this May 21, 2021
@daveMueller daveMueller added the untriaged To be investigated label May 21, 2021
@sergiusignacius
Copy link

@daveMueller any ETA on getting some feedback on this one? Or maybe a few directions on how we can test and debug this ourselves?

@daveMueller
Copy link
Collaborator

Sorry really busy at the moment. We fixed a couple of issues with async patterns in the last months. I had high hopes that we already fixed this but I just checked it and I'm having the same issue. I will find some time in the next days to dig into the different dlls and report immediately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants