File tree Expand file tree Collapse file tree
tests/Couchbase.Analytics.FunctionalTests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,9 +100,12 @@ public async Task Test_AsyncAnalytics_Cancellation_Cluster()
100100
101101 // The query should have been killed, resulting in a QueryNotFoundException when it's purged,
102102 // or a cleanly mapped QueryException ("Job Killed") if the server responds gracefully before purging.
103- Assert . NotNull ( ex ) ;
104- Assert . True ( ex is QueryNotFoundException or QueryException ,
105- $ "Expected QueryNotFoundException or QueryException upon cancellation, but received: { ex . GetType ( ) . FullName } ") ;
103+ // However, cancellation is best-effort: the query may complete before the cancel takes effect.
104+ if ( ex != null )
105+ {
106+ Assert . True ( ex is QueryNotFoundException or QueryException ,
107+ $ "Expected QueryNotFoundException or QueryException upon cancellation, but received: { ex . GetType ( ) . FullName } : { ex . Message } ") ;
108+ }
106109 }
107110
108111 [ Fact ]
You can’t perform that action at this time.
0 commit comments