File tree Expand file tree Collapse file tree
tests/SlidingWindowCache.Integration.Tests Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments