Skip to content

Commit d73e2bb

Browse files
Fix SuppliesCancellationTokenThatSignalsWhenRevalidationLoopIsBeingDiscarded flake (#63538)
Co-authored-by: Ondřej Roztočil <[email protected]>
1 parent 78b2252 commit d73e2bb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Components/Server/test/Circuits/RevalidatingServerAuthenticationStateProviderTest.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ public async Task StopsRevalidatingAfterDisposal()
142142
}
143143

144144
[Fact]
145-
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/60472")]
146145
public async Task SuppliesCancellationTokenThatSignalsWhenRevalidationLoopIsBeingDiscarded()
147146
{
148147
// Arrange
@@ -174,9 +173,11 @@ public async Task SuppliesCancellationTokenThatSignalsWhenRevalidationLoopIsBein
174173
Assert.Equal("different user", (await provider.GetAuthenticationStateAsync()).User.Identity.Name);
175174

176175
// Subsequent revalidation can complete successfully
176+
// We are checking all new logs because the revalidation loop iteration
177+
// may happen multiple times (this made the test flaky in the past)
177178
await provider.NextValidateAuthenticationStateAsyncCall;
178-
Assert.Collection(provider.RevalidationCallLog.Skip(1),
179-
call => Assert.Equal("different user", call.AuthenticationState.User.Identity.Name));
179+
Assert.All(provider.RevalidationCallLog.Skip(1),
180+
call => Assert.Equal("different user", call.AuthenticationState.User.Identity.Name));
180181
}
181182

182183
[Fact]

0 commit comments

Comments
 (0)