diff --git a/src/Components/Server/test/Circuits/RevalidatingServerAuthenticationStateProviderTest.cs b/src/Components/Server/test/Circuits/RevalidatingServerAuthenticationStateProviderTest.cs index c734415ce0cc..483fc9f667d6 100644 --- a/src/Components/Server/test/Circuits/RevalidatingServerAuthenticationStateProviderTest.cs +++ b/src/Components/Server/test/Circuits/RevalidatingServerAuthenticationStateProviderTest.cs @@ -142,7 +142,6 @@ public async Task StopsRevalidatingAfterDisposal() } [Fact] - [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/60472")] public async Task SuppliesCancellationTokenThatSignalsWhenRevalidationLoopIsBeingDiscarded() { // Arrange @@ -174,9 +173,11 @@ public async Task SuppliesCancellationTokenThatSignalsWhenRevalidationLoopIsBein Assert.Equal("different user", (await provider.GetAuthenticationStateAsync()).User.Identity.Name); // Subsequent revalidation can complete successfully + // We are checking all new logs because the revalidation loop iteration + // may happen multiple times (this made the test flaky in the past) await provider.NextValidateAuthenticationStateAsyncCall; - Assert.Collection(provider.RevalidationCallLog.Skip(1), - call => Assert.Equal("different user", call.AuthenticationState.User.Identity.Name)); + Assert.All(provider.RevalidationCallLog.Skip(1), + call => Assert.Equal("different user", call.AuthenticationState.User.Identity.Name)); } [Fact]