Skip to content

Commit fa24a53

Browse files
committed
PR feedback
1 parent 3012478 commit fa24a53

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Servers/Kestrel/test/Interop.FunctionalTests/Http3/Http3RequestTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1992,6 +1992,10 @@ public async Task GET_GracefulServerShutdown_AbortRequestsAfterHostTimeout(HttpP
19921992
var readAsyncTask = new TaskCompletionSource<Task>(TaskCreationOptions.RunContinuationsAsynchronously);
19931993
var requestAbortedTcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
19941994

1995+
// Wait 2.5 seconds in debug (local development) and 15 seconds in production (CI)
1996+
// Use half the default timeout to ensure the host shuts down before the test throws an error while waiting.
1997+
var shutdownTimeout = Microsoft.AspNetCore.InternalTesting.TaskExtensions.DefaultTimeoutTimeSpan / 2;
1998+
19951999
var builder = CreateHostBuilder(async context =>
19962000
{
19972001
context.RequestAborted.Register(() => requestAbortedTcs.SetResult());
@@ -2022,7 +2026,7 @@ public async Task GET_GracefulServerShutdown_AbortRequestsAfterHostTimeout(HttpP
20222026
listenOptions.UseHttps(TestResources.GetTestCertificate());
20232027
});
20242028
},
2025-
shutdownTimeout: TimeSpan.FromSeconds(2));
2029+
shutdownTimeout: shutdownTimeout);
20262030

20272031
using (var host = builder.Build())
20282032
using (var client = HttpHelpers.CreateClient())

0 commit comments

Comments
 (0)