@@ -28,10 +28,9 @@ namespace System.Net.Http.Functional.Tests
28
28
{
29
29
using Configuration = System . Net . Test . Common . Configuration ;
30
30
31
- [ ConditionalClass ( typeof ( PlatformDetection ) , nameof ( PlatformDetection . IsNotBrowser ) ) ]
32
- public sealed class SocketsHttpHandler_HttpClientHandler_Asynchrony_Test : HttpClientHandler_Asynchrony_Test
31
+ public sealed class SocketsHttpHandler_HttpClientHandler_Asynchrony_Test_Http11 : SocketsHttpHandler_HttpClientHandler_Asynchrony_Test
33
32
{
34
- public SocketsHttpHandler_HttpClientHandler_Asynchrony_Test ( ITestOutputHelper output ) : base ( output ) { }
33
+ public SocketsHttpHandler_HttpClientHandler_Asynchrony_Test_Http11 ( ITestOutputHelper output ) : base ( output ) { }
35
34
36
35
[ OuterLoop ( "Relies on finalization" ) ]
37
36
[ Fact ]
@@ -98,6 +97,25 @@ static async Task MakeARequestWithoutDisposingTheHandlerAsync()
98
97
requestCompleted . SetResult ( ) ;
99
98
}
100
99
}
100
+ }
101
+
102
+ public sealed class SocketsHttpHandler_HttpClientHandler_Asynchrony_Test_Http2 : SocketsHttpHandler_HttpClientHandler_Asynchrony_Test
103
+ {
104
+ public SocketsHttpHandler_HttpClientHandler_Asynchrony_Test_Http2 ( ITestOutputHelper output ) : base ( output ) { }
105
+ protected override Version UseVersion => HttpVersion . Version20 ;
106
+ }
107
+
108
+ [ ConditionalClass ( typeof ( HttpClientHandlerTestBase ) , nameof ( IsQuicSupported ) ) ]
109
+ public sealed class SocketsHttpHandler_HttpClientHandler_Asynchrony_Test_Http3 : SocketsHttpHandler_HttpClientHandler_Asynchrony_Test
110
+ {
111
+ public SocketsHttpHandler_HttpClientHandler_Asynchrony_Test_Http3 ( ITestOutputHelper output ) : base ( output ) { }
112
+ protected override Version UseVersion => HttpVersion . Version30 ;
113
+ }
114
+
115
+ [ ConditionalClass ( typeof ( PlatformDetection ) , nameof ( PlatformDetection . IsNotBrowser ) ) ]
116
+ public abstract class SocketsHttpHandler_HttpClientHandler_Asynchrony_Test : HttpClientHandler_Asynchrony_Test
117
+ {
118
+ public SocketsHttpHandler_HttpClientHandler_Asynchrony_Test ( ITestOutputHelper output ) : base ( output ) { }
101
119
102
120
[ Fact ]
103
121
public async Task ReadAheadTaskOnConnectionReuse_ExceptionsAreObserved ( )
@@ -191,7 +209,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(
191
209
public async Task ExecutionContext_HttpConnectionLifetimeDoesntKeepContextAlive ( )
192
210
{
193
211
var clientCompleted = new TaskCompletionSource ( TaskCreationOptions . RunContinuationsAsynchronously ) ;
194
- await LoopbackServer . CreateClientAndServerAsync ( async uri =>
212
+ await LoopbackServerFactory . CreateClientAndServerAsync ( async uri =>
195
213
{
196
214
try
197
215
{
@@ -217,7 +235,9 @@ await LoopbackServer.CreateClientAndServerAsync(async uri =>
217
235
{
218
236
await server . AcceptConnectionAsync ( async connection =>
219
237
{
220
- await connection . ReadRequestHeaderAndSendResponseAsync ( ) ;
238
+ await connection . ReadRequestDataAsync ( ) ;
239
+ await connection . SendResponseAsync ( ) ;
240
+
221
241
await clientCompleted . Task ;
222
242
} ) ;
223
243
} ) ;
@@ -240,7 +260,7 @@ private static (Task completedOnFinalized, Task getRequest) MakeHttpRequestWithT
240
260
return ( tcs . Task , t ) ;
241
261
}
242
262
243
- private sealed class SetOnFinalized
263
+ protected sealed class SetOnFinalized
244
264
{
245
265
public readonly TaskCompletionSource CompletedWhenFinalized = new ( TaskCreationOptions . RunContinuationsAsynchronously ) ;
246
266
0 commit comments