Skip to content

Commit

Permalink
Ignore WindowUpdates in frame-order-sensitive tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CarnaViire committed Mar 14, 2024
1 parent 9f8698b commit d739075
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public static async Task<WebSocketRequestData> 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);
Expand Down

0 comments on commit d739075

Please sign in to comment.