File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/Servers/Kestrel/test/Interop.FunctionalTests/Http3 Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff 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 ( ) )
You can’t perform that action at this time.
0 commit comments