You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
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.
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.
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 toawait 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.
The text was updated successfully, but these errors were encountered: