dotnet / dotnet/extensions

Code coverage issues

Open
#4,124 4 comments 0 reactions 1 assignee Claimed by @RussKie View on GitHub
area-infrastructure work in progress :construction:
Dominant language
C#
Stars
3.2k
Forks
894
Avg merge
1d 12h
Merged PRs (30d)
23

Description

### Description

In the PR #4108 I had to decrease the code-coverage from 100% to 98% because the build pipeline handles the code-coverage processing incorrectly.

The following lines:
https://github.com/dotnet/extensions/blob/e70559f242e782939f857cf8f2919a188fb476fc/src/Libraries/Microsoft.Extensions.Http.Resilience/FaultInjection/Internal/Log.cs#L16

https://github.com/dotnet/extensions/blob/e70559f242e782939f857cf8f2919a188fb476fc/src/Libraries/Microsoft.Extensions.Http.Resilience/Resilience/HttpClientBuilderExtensions.Resilience.cs#L31

are correctly covered and tested, but the build fails.

There are also additional inconsistencies:

- `Check project coverage` step reports coverage of 98.46 - https://dev.azure.com/dnceng-public/public/_build/results?buildId=321876&view=logs&jobId=a7f66332-f7db-5a7e-ef2b-0455d70db552&j=a7f66332-f7db-5a7e-ef2b-0455d70db552&t=191c5785-431b-5c6c-a3e4-efe3a8133507
- Code Coverage Report reports 99.9% code coverage - https://dev.azure.com/dnceng-public/public/_build/results?buildId=321876&view=codecoverage-tab

### Reproduction Steps

Increase the min coverage to 100, the build fails:

https://github.com/dotnet/extensions/blob/6d67b4166ff0b4fccec093c96ea6998a0a76ff5a/src/Libraries/Microsoft.Extensions.Http.Resilience/Microsoft.Extensions.Http.Resilience.csproj#L22

### Expected behavior

Increase the min coverage to 100, the build should succeed:

https://github.com/dotnet/extensions/blob/6d67b4166ff0b4fccec093c96ea6998a0a76ff5a/src/Libraries/Microsoft.Extensions.Http.Resilience/Microsoft.Extensions.Http.Resilience.csproj#L22

### Actual behavior

The build fails when increasing the code-coverage to 100

https://github.com/dotnet/extensions/blob/6d67b4166ff0b4fccec093c96ea6998a0a76ff5a/src/Libraries/Microsoft.Extensions.Http.Resilience/Microsoft.Extensions.Http.Resilience.csproj#L22

### Regression?

_No response_

### Known Workarounds

_No response_

### Configuration

_No response_

### Other information

Please

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.