Skip to content

Commit cf3ce32

Browse files
blaze6950Copilot
andauthored
Update tests/SlidingWindowCache.Integration.Tests/StrongConsistencyModeTests.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 791737b commit cf3ce32

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

tests/SlidingWindowCache.Integration.Tests/StrongConsistencyModeTests.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -380,11 +380,10 @@ public async Task GetDataAndWaitForIdleAsync_CancelDuringWait_ThrowsOperationCan
380380

381381
var exception = await Record.ExceptionAsync(async () => await operationTask);
382382

383-
// ASSERT — either cancelled during GetDataAsync or WaitForIdleAsync
383+
// ASSERT — cancellation of the operation should surface as OperationCanceledException,
384+
// regardless of whether it is observed during GetDataAsync or WaitForIdleAsync.
384385
Assert.NotNull(exception);
385-
Assert.True(
386-
exception is OperationCanceledException or ObjectDisposedException,
387-
$"Expected OperationCanceledException or ObjectDisposedException, got {exception.GetType().Name}");
386+
Assert.IsType<OperationCanceledException>(exception);
388387
}
389388

390389
#endregion

0 commit comments

Comments
 (0)