@@ -28,10 +28,9 @@ namespace System.Net.Http.Functional.Tests
2828{
2929 using Configuration = System . Net . Test . Common . Configuration ;
3030
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
3332 {
34- public SocketsHttpHandler_HttpClientHandler_Asynchrony_Test ( ITestOutputHelper output ) : base ( output ) { }
33+ public SocketsHttpHandler_HttpClientHandler_Asynchrony_Test_Http11 ( ITestOutputHelper output ) : base ( output ) { }
3534
3635 [ OuterLoop ( "Relies on finalization" ) ]
3736 [ Fact ]
@@ -98,6 +97,25 @@ static async Task MakeARequestWithoutDisposingTheHandlerAsync()
9897 requestCompleted . SetResult ( ) ;
9998 }
10099 }
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 ) { }
101119
102120 [ Fact ]
103121 public async Task ReadAheadTaskOnConnectionReuse_ExceptionsAreObserved ( )
@@ -191,7 +209,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(
191209 public async Task ExecutionContext_HttpConnectionLifetimeDoesntKeepContextAlive ( )
192210 {
193211 var clientCompleted = new TaskCompletionSource ( TaskCreationOptions . RunContinuationsAsynchronously ) ;
194- await LoopbackServer . CreateClientAndServerAsync ( async uri =>
212+ await LoopbackServerFactory . CreateClientAndServerAsync ( async uri =>
195213 {
196214 try
197215 {
@@ -217,7 +235,9 @@ await LoopbackServer.CreateClientAndServerAsync(async uri =>
217235 {
218236 await server . AcceptConnectionAsync ( async connection =>
219237 {
220- await connection . ReadRequestHeaderAndSendResponseAsync ( ) ;
238+ await connection . ReadRequestDataAsync ( ) ;
239+ await connection . SendResponseAsync ( ) ;
240+
221241 await clientCompleted . Task ;
222242 } ) ;
223243 } ) ;
@@ -240,7 +260,7 @@ private static (Task completedOnFinalized, Task getRequest) MakeHttpRequestWithT
240260 return ( tcs . Task , t ) ;
241261 }
242262
243- private sealed class SetOnFinalized
263+ protected sealed class SetOnFinalized
244264 {
245265 public readonly TaskCompletionSource CompletedWhenFinalized = new ( TaskCreationOptions . RunContinuationsAsynchronously ) ;
246266
0 commit comments