From d7390754c80f591386d8918a6ab7aae9c80fe178 Mon Sep 17 00:00:00 2001 From: Natalia Kondratyeva Date: Thu, 14 Mar 2024 11:20:46 +0000 Subject: [PATCH] Ignore WindowUpdates in frame-order-sensitive tests --- .../SocketsHttpHandlerTest.Http2ExtendedConnect.cs | 3 +++ .../tests/LoopbackServer/WebSocketHandshakeHelper.cs | 1 + 2 files changed, 4 insertions(+) diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.Http2ExtendedConnect.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.Http2ExtendedConnect.cs index cb1a15df14e77..f3a46d4d08507 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.Http2ExtendedConnect.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.Http2ExtendedConnect.cs @@ -85,6 +85,7 @@ await Http2LoopbackServerFactory.Singleton.CreateClientAndServerAsync(async uri async server => { await using Http2LoopbackConnection connection = await ((Http2LoopbackServer)server).EstablishConnectionAsync(new SettingsEntry { SettingId = SettingId.EnableConnect, Value = 1 }); + connection.IgnoreWindowUpdates(); (int streamId, HttpRequestData request) = await connection.ReadAndParseRequestHeaderAsync(readBody: false); @@ -227,6 +228,7 @@ await Http2LoopbackServerFactory.Singleton.CreateClientAndServerAsync( { await using var connection = await ((Http2LoopbackServer)server).EstablishConnectionAsync( new SettingsEntry { SettingId = SettingId.EnableConnect, Value = 1 }); + connection.IgnoreWindowUpdates(); (int streamId, _) = await connection.ReadAndParseRequestHeaderAsync(readBody: false); await connection.SendResponseHeadersAsync(streamId, endStream: false); @@ -279,6 +281,7 @@ await Http2LoopbackServerFactory.Singleton.CreateClientAndServerAsync( { await using var connection = await ((Http2LoopbackServer)server).EstablishConnectionAsync( new SettingsEntry { SettingId = SettingId.EnableConnect, Value = 1 }); + connection.IgnoreWindowUpdates(); (int streamId, _) = await connection.ReadAndParseRequestHeaderAsync(readBody: false); await connection.SendResponseHeadersAsync(streamId, endStream: false); diff --git a/src/libraries/System.Net.WebSockets.Client/tests/LoopbackServer/WebSocketHandshakeHelper.cs b/src/libraries/System.Net.WebSockets.Client/tests/LoopbackServer/WebSocketHandshakeHelper.cs index f4d2f42f5edbb..2a8c84e7de8ea 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/LoopbackServer/WebSocketHandshakeHelper.cs +++ b/src/libraries/System.Net.WebSockets.Client/tests/LoopbackServer/WebSocketHandshakeHelper.cs @@ -57,6 +57,7 @@ public static async Task ProcessHttp2RequestAsync(Http2Loo { var connection = await server.EstablishConnectionAsync(new SettingsEntry { SettingId = SettingId.EnableConnect, Value = 1 }) .WaitAsync(cancellationToken).ConfigureAwait(false); + connection.IgnoreWindowUpdates(); (int streamId, var httpRequestData) = await connection.ReadAndParseRequestHeaderAsync(readBody: false) .WaitAsync(cancellationToken).ConfigureAwait(false);