Quarantine Microsoft.AspNetCore.Identity.Test.UserManagerTest
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
The `UserManagerTest` class in `src/Identity/test/Identity.Test/UserManagerTest.cs` is intermittently failing due to a metrics timing flakiness issue. Multiple test methods fail with `Assert.Collection() Failure: Item comparison failure` where the measured duration of an Identity operation is reported as `0`, violating the assertion `Duration should be greater than 0.` in the metrics helper.
All failures share the same root cause: a metrics instrument records a duration of `0` for a store operation, likely when the operation completes too quickly for the timer resolution on the test machine.
## Failing methods
The following 14 test methods have been observed failing across 2 CI builds:
- `PasswordMethodsFailWhenStoreNotImplemented`
- `UsersEmailMethodsFailWhenStoreNotImplemented`
- `CheckPasswordWillRehashPasswordWhenNeeded`
- `DeleteCallsStore_Failure`
- `ClaimMethodsFailWhenStoreNotImplemented`
- `UpdateFailsWithNullSecurityStamp`
- `CreateFailsWithNullSecurityStamp`
- `DeleteCallsStore_Success`
- `UsersPhoneNumberMethodsFailWhenStoreNotImplemented`
- `RemoveClaimCallsStore`
- `LoginMethodsFailWhenStoreNotImplemented`
- `RemoveClaimsCallsStore`
- `UpdateClaimCallsStore`
- `SecurityStampMethodsFailWhenStoreNotImplemented`
## Error
```
Assert.Collection() Failure: Item comparison failure
↓ (pos 0)
Collection: [CollectedMeasurement`1 { Tags = [["aspnetcore.identity.user_type"] = "Microsoft.AspNetCore.Identity.Test.PocoUser", ...], Value = 0 }]
Error: Duration should be greater than 0.
```
## CI build links
- https://dev.azure.com/dnceng-public/public/_build/results?buildId=1488387 (2026-06-30, `batch_3--net11.0`)
- https://dev.azure.com/dnceng-public/public/_build/results?buildId=1458137 (2026-06-10, `batch_3--net11.0`)
> Generated by [Daily Test Quarantine Management](https://github.com/dotnet/aspnetcore/actions/runs/28513280759) · 862.7 AIC · ⌖ 9.22 AIC · ⊞ 2.9K · [◷](https://github.com/search?q=repo%3Adotnet%2Faspnetcore+is%3Aissue+%22gh-aw-workflow-call-id%3A+dotnet%2Faspnetcore%2Ftest-quarantine%22&type=issues)
Contributor guide
Research direction
Start in src/Identity/test/Identity.Test/UserManagerTest.cs and review the listed failing methods together with the metrics helper assertion that rejects a duration of 0. Use the two linked CI builds as failure context and verify the affected tests no longer produce zero-duration measurements or intermittent collection failures; the issue does not specify the quarantine mechanism or exact code change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100