File tree Expand file tree Collapse file tree
tests/StackExchange.Redis.Tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -156,6 +156,8 @@ public async Task CancellationDuringOperation_Async_CancelsGracefully(CancelStra
156156 [ Fact ]
157157 public async Task ScanCancellable ( )
158158 {
159+ Skip . UnlessLongRunning ( ) ; // because of CLIENT PAUSE impact to unrelated tests
160+
159161 using var conn = Create ( ) ;
160162 var db = conn . GetDatabase ( ) ;
161163 var server = conn . GetServer ( conn . GetEndPoints ( ) [ 0 ] ) ;
@@ -182,7 +184,7 @@ public async Task ScanCancellable()
182184 var taken = watch . ElapsedMilliseconds ;
183185 // Expected if cancellation happens during operation
184186 Log ( $ "Cancelled after { taken } ms") ;
185- Assert . True ( taken < ConnectionPauseMilliseconds / 2 , "Should have cancelled much sooner" ) ;
187+ Assert . True ( taken < ( ConnectionPauseMilliseconds * 3 ) / 4 , $ "Should have cancelled sooner; took { taken } ms ") ;
186188 Assert . Equal ( cts . Token , oce . CancellationToken ) ;
187189 }
188190 }
You can’t perform that action at this time.
0 commit comments