File tree Expand file tree Collapse file tree
Open.ChannelExtensions.Tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ public static async Task WaitCancellation()
1010 {
1111 CancellationToken token = tokenSource . Token ;
1212
13- var t = channel . Reader . WaitToReadAsync ( token ) . ConfigureAwait ( false ) ;
13+ var t = channel . Reader . WaitToReadAsync ( token ) ;
1414 tokenSource . Cancel ( ) ;
1515
1616 // NOTE: a cancelled WaitToReadAsync will throw.
@@ -26,7 +26,7 @@ public static async Task WaitCancellation()
2626 tokenSource . Cancel ( ) ;
2727
2828 // NOTE: a cancelled WhenAny will not throw!
29- var result = await Task . WhenAny ( t1 . AsTask ( ) , t2 . AsTask ( ) ) . ConfigureAwait ( false ) ;
29+ var result = await Task . WhenAny ( t1 . AsTask ( ) , t2 . AsTask ( ) ) ;
3030 Assert . True ( result . IsCanceled ) ;
3131 }
3232 }
Original file line number Diff line number Diff line change @@ -361,7 +361,7 @@ public static async Task ReadBatchWithTimeoutEnumerableBakedIn()
361361 Debug . WriteLine ( "First batch received: " + string . Join ( ',' , batch . Select ( item => item ) ) ) ;
362362 break ;
363363 case 1 :
364- Assert . Equal ( 1 , batch . Count ) ;
364+ Assert . Single ( batch ) ;
365365 Assert . Equal ( 3 , batch [ 0 ] ) ;
366366 Debug . WriteLine ( "Second batch received: " + string . Join ( ',' , batch . Select ( item => item ) ) ) ;
367367 break ;
Original file line number Diff line number Diff line change @@ -21,7 +21,9 @@ public void PossibleSourceLoadingIssue()
2121
2222 queue . CompleteAdding ( ) ;
2323
24+ #pragma warning disable xUnit1031 // Do not use blocking task operations in test method
2425 processingTask . Wait ( ) ;
26+ #pragma warning restore xUnit1031 // Do not use blocking task operations in test method
2527
2628 Assert . Equal ( expectedCount , count_ ) ;
2729
You can’t perform that action at this time.
0 commit comments