From 8531e2e83fedf212d51270ba43f00ad85505f329 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Thu, 19 Mar 2020 13:03:52 +1300 Subject: [PATCH] Fix flaky FlowControl_ParallelStreams_FirstInFirstOutOrder (#19977) --- .../InMemory.FunctionalTests/Http2/Http2ConnectionTests.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2ConnectionTests.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2ConnectionTests.cs index bcc4b43fe9..6fd7ce1d8b 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2ConnectionTests.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2ConnectionTests.cs @@ -30,6 +30,11 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests [QuarantinedTest] public async Task FlowControl_ParallelStreams_FirstInFirstOutOrder() { + // Increase response buffer size so there is no delay in writing to it. + // We only want to hit flow control back-pressure and not pipe back-pressure. + // This fixes flakyness https://github.com/dotnet/aspnetcore/pull/19949 + _serviceContext.ServerOptions.Limits.MaxResponseBufferSize = 128 * 1024; + var writeTcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); await InitializeConnectionAsync(async c =>