@@ -32,7 +32,7 @@ public async Task AcceptAsync_CancellationThenAccept_AcceptStreamAfterCancellati
32
32
33
33
var options = QuicTestHelpers . CreateClientConnectionOptions ( connectionListener . EndPoint ) ;
34
34
35
- using var clientConnection = new QuicConnection ( QuicImplementationProviders . MsQuic , options ) ;
35
+ using var clientConnection = await QuicConnection . ConnectAsync ( options ) ;
36
36
await clientConnection . ConnectAsync ( ) . DefaultTimeout ( ) ;
37
37
38
38
await using var serverConnection = await acceptTask . DefaultTimeout ( ) ;
@@ -74,7 +74,7 @@ public async Task AcceptAsync_ClientClosesConnection_ServerNotified()
74
74
75
75
var options = QuicTestHelpers . CreateClientConnectionOptions ( connectionListener . EndPoint ) ;
76
76
77
- using var clientConnection = new QuicConnection ( QuicImplementationProviders . MsQuic , options ) ;
77
+ using var clientConnection = await QuicConnection . ConnectAsync ( options ) ;
78
78
await clientConnection . ConnectAsync ( ) . DefaultTimeout ( ) ;
79
79
80
80
await using var serverConnection = await acceptTask . DefaultTimeout ( ) ;
@@ -100,7 +100,7 @@ public async Task AcceptAsync_ClientStartsAndStopsUnidirectionStream_ServerAccep
100
100
await using var connectionListener = await QuicTestHelpers . CreateConnectionListenerFactory ( LoggerFactory ) ;
101
101
102
102
var options = QuicTestHelpers . CreateClientConnectionOptions ( connectionListener . EndPoint ) ;
103
- using var quicConnection = new QuicConnection ( QuicImplementationProviders . MsQuic , options ) ;
103
+ using var quicConnection = await QuicConnection . ConnectAsync ( options ) ;
104
104
await quicConnection . ConnectAsync ( ) . DefaultTimeout ( ) ;
105
105
106
106
await using var serverConnection = await connectionListener . AcceptAndAddFeatureAsync ( ) . DefaultTimeout ( ) ;
@@ -143,7 +143,7 @@ public async Task AcceptAsync_ClientStartsAndStopsBidirectionStream_ServerAccept
143
143
await using var connectionListener = await QuicTestHelpers . CreateConnectionListenerFactory ( LoggerFactory ) ;
144
144
145
145
var options = QuicTestHelpers . CreateClientConnectionOptions ( connectionListener . EndPoint ) ;
146
- using var quicConnection = new QuicConnection ( QuicImplementationProviders . MsQuic , options ) ;
146
+ using var quicConnection = await QuicConnection . ConnectAsync ( options ) ;
147
147
await quicConnection . ConnectAsync ( ) . DefaultTimeout ( ) ;
148
148
149
149
var serverConnection = await connectionListener . AcceptAndAddFeatureAsync ( ) . DefaultTimeout ( ) ;
@@ -194,7 +194,7 @@ public async Task AcceptAsync_ServerStartsAndStopsUnidirectionStream_ClientAccep
194
194
await using var connectionListener = await QuicTestHelpers . CreateConnectionListenerFactory ( LoggerFactory ) ;
195
195
196
196
var options = QuicTestHelpers . CreateClientConnectionOptions ( connectionListener . EndPoint ) ;
197
- using var quicConnection = new QuicConnection ( QuicImplementationProviders . MsQuic , options ) ;
197
+ using var quicConnection = await QuicConnection . ConnectAsync ( options ) ;
198
198
await quicConnection . ConnectAsync ( ) . DefaultTimeout ( ) ;
199
199
200
200
var serverConnection = await connectionListener . AcceptAndAddFeatureAsync ( ) . DefaultTimeout ( ) ;
@@ -240,7 +240,7 @@ public async Task AcceptAsync_ClientClosesConnection_ExceptionThrown()
240
240
await using var connectionListener = await QuicTestHelpers . CreateConnectionListenerFactory ( LoggerFactory ) ;
241
241
242
242
var options = QuicTestHelpers . CreateClientConnectionOptions ( connectionListener . EndPoint ) ;
243
- using var quicConnection = new QuicConnection ( QuicImplementationProviders . MsQuic , options ) ;
243
+ using var quicConnection = await QuicConnection . ConnectAsync ( options ) ;
244
244
await quicConnection . ConnectAsync ( ) . DefaultTimeout ( ) ;
245
245
246
246
var serverConnection = await connectionListener . AcceptAndAddFeatureAsync ( ) . DefaultTimeout ( ) ;
@@ -266,7 +266,7 @@ public async Task StreamPool_StreamAbortedOnServer_NotPooled()
266
266
await using var connectionListener = await QuicTestHelpers . CreateConnectionListenerFactory ( LoggerFactory ) ;
267
267
268
268
var options = QuicTestHelpers . CreateClientConnectionOptions ( connectionListener . EndPoint ) ;
269
- using var clientConnection = new QuicConnection ( QuicImplementationProviders . MsQuic , options ) ;
269
+ using var clientConnection = await QuicConnection . ConnectAsync ( options ) ;
270
270
await clientConnection . ConnectAsync ( ) . DefaultTimeout ( ) ;
271
271
272
272
await using var serverConnection = await connectionListener . AcceptAndAddFeatureAsync ( ) . DefaultTimeout ( ) ;
@@ -310,7 +310,7 @@ public async Task StreamPool_StreamAbortedOnServerAfterComplete_NotPooled()
310
310
await using var connectionListener = await QuicTestHelpers . CreateConnectionListenerFactory ( LoggerFactory ) ;
311
311
312
312
var options = QuicTestHelpers . CreateClientConnectionOptions ( connectionListener . EndPoint ) ;
313
- using var clientConnection = new QuicConnection ( QuicImplementationProviders . MsQuic , options ) ;
313
+ using var clientConnection = await QuicConnection . ConnectAsync ( options ) ;
314
314
await clientConnection . ConnectAsync ( ) . DefaultTimeout ( ) ;
315
315
316
316
await using var serverConnection = await connectionListener . AcceptAndAddFeatureAsync ( ) . DefaultTimeout ( ) ;
@@ -356,7 +356,7 @@ public async Task StreamPool_StreamAbortedOnClient_NotPooled()
356
356
await using var connectionListener = await QuicTestHelpers . CreateConnectionListenerFactory ( LoggerFactory ) ;
357
357
358
358
var options = QuicTestHelpers . CreateClientConnectionOptions ( connectionListener . EndPoint ) ;
359
- using var clientConnection = new QuicConnection ( QuicImplementationProviders . MsQuic , options ) ;
359
+ using var clientConnection = await QuicConnection . ConnectAsync ( options ) ;
360
360
await clientConnection . ConnectAsync ( ) . DefaultTimeout ( ) ;
361
361
362
362
await using var serverConnection = await connectionListener . AcceptAndAddFeatureAsync ( ) . DefaultTimeout ( ) ;
@@ -404,7 +404,7 @@ public async Task StreamPool_StreamAbortedOnClientAndServer_NotPooled()
404
404
await using var connectionListener = await QuicTestHelpers . CreateConnectionListenerFactory ( LoggerFactory ) ;
405
405
406
406
var options = QuicTestHelpers . CreateClientConnectionOptions ( connectionListener . EndPoint ) ;
407
- using var clientConnection = new QuicConnection ( QuicImplementationProviders . MsQuic , options ) ;
407
+ using var clientConnection = await QuicConnection . ConnectAsync ( options ) ;
408
408
await clientConnection . ConnectAsync ( ) . DefaultTimeout ( ) ;
409
409
410
410
await using var serverConnection = await connectionListener . AcceptAndAddFeatureAsync ( ) . DefaultTimeout ( ) ;
@@ -462,7 +462,7 @@ public async Task StreamPool_Heartbeat_ExpiredStreamRemoved()
462
462
await using var connectionListener = await QuicTestHelpers . CreateConnectionListenerFactory ( LoggerFactory , testSystemClock ) ;
463
463
464
464
var options = QuicTestHelpers . CreateClientConnectionOptions ( connectionListener . EndPoint ) ;
465
- using var clientConnection = new QuicConnection ( QuicImplementationProviders . MsQuic , options ) ;
465
+ using var clientConnection = await QuicConnection . ConnectAsync ( options ) ;
466
466
await clientConnection . ConnectAsync ( ) . DefaultTimeout ( ) ;
467
467
468
468
await using var serverConnection = await connectionListener . AcceptAndAddFeatureAsync ( ) . DefaultTimeout ( ) ;
@@ -517,7 +517,7 @@ public async Task StreamPool_ManyConcurrentStreams_StreamPoolFull()
517
517
await using var connectionListener = await QuicTestHelpers . CreateConnectionListenerFactory ( LoggerFactory ) ;
518
518
519
519
var options = QuicTestHelpers . CreateClientConnectionOptions ( connectionListener . EndPoint ) ;
520
- using var clientConnection = new QuicConnection ( QuicImplementationProviders . MsQuic , options ) ;
520
+ using var clientConnection = await QuicConnection . ConnectAsync ( options ) ;
521
521
await clientConnection . ConnectAsync ( ) . DefaultTimeout ( ) ;
522
522
523
523
await using var serverConnection = await connectionListener . AcceptAndAddFeatureAsync ( ) . DefaultTimeout ( ) ;
@@ -596,7 +596,7 @@ public async Task PersistentState_StreamsReused_StatePersisted()
596
596
await using var connectionListener = await QuicTestHelpers . CreateConnectionListenerFactory ( LoggerFactory ) ;
597
597
598
598
var options = QuicTestHelpers . CreateClientConnectionOptions ( connectionListener . EndPoint ) ;
599
- using var clientConnection = new QuicConnection ( QuicImplementationProviders . MsQuic , options ) ;
599
+ using var clientConnection = await QuicConnection . ConnectAsync ( options ) ;
600
600
await clientConnection . ConnectAsync ( ) . DefaultTimeout ( ) ;
601
601
602
602
await using var serverConnection = await connectionListener . AcceptAndAddFeatureAsync ( ) . DefaultTimeout ( ) ;
0 commit comments