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 @@ -362,7 +362,7 @@ public static async Task ReadBatchWithTimeoutEnumerableBakedIn()
362362 Debug . WriteLine ( "First batch received: " + string . Join ( ',' , batch . Select ( item => item ) ) ) ;
363363 break ;
364364 case 1 :
365- Assert . Equal ( 1 , batch . Count ) ;
365+ Assert . Single ( batch ) ;
366366 Assert . Equal ( 3 , batch [ 0 ] ) ;
367367 Debug . WriteLine ( "Second batch received: " + string . Join ( ',' , batch . Select ( item => item ) ) ) ;
368368 break ;
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ namespace Open.ChannelExtensions.Tests;
55public class SpecialTests
66{
77 [ Fact ]
8- public void PossibleSourceLoadingIssue ( )
8+ public async Task PossibleSourceLoadingIssue ( )
99 {
1010 const int expectedCount = 10000000 ;
1111 int count_ = 0 ;
@@ -21,7 +21,7 @@ public void PossibleSourceLoadingIssue()
2121
2222 queue . CompleteAdding ( ) ;
2323
24- processingTask . Wait ( ) ;
24+ await processingTask ;
2525
2626 Assert . Equal ( expectedCount , count_ ) ;
2727
You can’t perform that action at this time.
0 commit comments