Skip to content

Commit f66f16b

Browse files
committed
Reinstate async enumerable tests
These were conditioned on a target we no longer build.
1 parent 2904e98 commit f66f16b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/NetMQ.Tests/ClientServer.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)