Skip to content

Fix flaky ClaimTypesConst tests#171

Merged
JasonMWebb merged 1 commit into
mainfrom
bugfix/security-test-parallelization
Jul 14, 2026
Merged

Fix flaky ClaimTypesConst tests#171
JasonMWebb merged 1 commit into
mainfrom
bugfix/security-test-parallelization

Conversation

@JasonMWebb

Copy link
Copy Markdown
Collaborator

ClaimTypesConstTests.Configure_AppliesCustomValues intermittently failed on CI (seeing the default role claim URI instead of the configured "roles"). Root cause is a cross-class race on the process-wide mutable static ClaimTypesConst: both ClaimTypesConstTests and ClaimsIdentityExtensionsTests call the internal Reset() in ctor/Dispose, and under xUnit's default per-class parallelism a parallel Reset() can null the options mid-test so a later property read rebuilds defaults.

Disable test parallelization for RCommon.Security.Tests so the shared static state is deterministic. Pre-existing flake, unrelated to the 3.1.1 changes; it blocked the release CI run.

…mbly

ClaimTypesConstTests.Configure_AppliesCustomValues intermittently failed on CI
(seeing the default role claim URI instead of the configured "roles"). Root
cause is a cross-class race on the process-wide mutable static ClaimTypesConst:
both ClaimTypesConstTests and ClaimsIdentityExtensionsTests call the internal
Reset() in ctor/Dispose, and under xUnit's default per-class parallelism a
parallel Reset() can null the options mid-test so a later property read rebuilds
defaults.

Disable test parallelization for RCommon.Security.Tests so the shared static
state is deterministic. Pre-existing flake, unrelated to the 3.1.1 changes; it
blocked the release CI run.
@JasonMWebb JasonMWebb merged commit d49aabf into main Jul 14, 2026
3 checks passed
@JasonMWebb JasonMWebb deleted the bugfix/security-test-parallelization branch July 14, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants