File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -82,10 +82,9 @@ public async Task AsyncWithCancellationToken()
8282 await Assert . ThrowsAnyAsync < OperationCanceledException > ( async ( ) => await server . ReceiveStringAsync ( source . Token ) ) ;
8383 }
8484
85- #if NETCOREAPP3_1
86-
85+ #if NETSTANDARD || NET
8786 [ Fact ( Timeout = 120 ) ]
88- public async void AsyncEnumerableCanceled ( )
87+ public async Task AsyncEnumerableCanceled ( )
8988 {
9089 using CancellationTokenSource source = new CancellationTokenSource ( ) ;
9190 using var server = new ServerSocket ( ) ;
@@ -100,7 +99,7 @@ await Assert.ThrowsAnyAsync<OperationCanceledException>(async () =>
10099 }
101100
102101 [ Fact ( Timeout = 1000 ) ]
103- public void AsyncEnumerable ( )
102+ public async Task AsyncEnumerable ( )
104103 {
105104 using var server = new ServerSocket ( ) ;
106105 int port = server . BindRandomPort ( "tcp://*" ) ;
@@ -152,12 +151,10 @@ public void AsyncEnumerable()
152151 client . Send ( "1" ) ;
153152 client . Send ( "1" ) ;
154153
155- t1 . Wait ( ) ;
156- t2 . Wait ( ) ;
154+ await Task . WhenAll ( t1 , t2 ) ;
157155
158156 Assert . Equal ( 15002 , totalCount ) ;
159157 }
160-
161158#endif
162159 }
163160}
You can’t perform that action at this time.
0 commit comments