@@ -453,9 +453,10 @@ public async Task RemoveInProcessReference_FailedToFindRequestHandler()
453453 }
454454
455455 [ ConditionalFact ]
456+ [ RequiresNewHandler ]
456457 public async Task StartupTimeoutIsApplied ( )
457458 {
458- // From what I can tell, this failure is due to ungraceful shutdown.
459+ // From what we can tell, this failure is due to ungraceful shutdown.
459460 // The error could be the same as https://github.com/dotnet/core-setup/issues/4646
460461 // But can't be certain without another repro.
461462 using ( AppVerifier . Disable ( DeployerSelector . ServerType , 0x300 ) )
@@ -470,11 +471,45 @@ public async Task StartupTimeoutIsApplied()
470471 var response = await deploymentResult . HttpClient . GetAsync ( "/" ) ;
471472 Assert . Equal ( HttpStatusCode . InternalServerError , response . StatusCode ) ;
472473
474+ // Startup timeout now recycles process.
475+ deploymentResult . AssertWorkerProcessStop ( ) ;
476+
477+ EventLogHelpers . VerifyEventLogEvent ( deploymentResult ,
478+ EventLogHelpers . InProcessFailedToStart ( deploymentResult , "Managed server didn't initialize after 1000 ms." ) ,
479+ Logger ) ;
480+
481+ if ( DeployerSelector . HasNewHandler )
482+ {
483+ var responseContent = await response . Content . ReadAsStringAsync ( ) ;
484+ Assert . Contains ( "500.37" , responseContent ) ;
485+ }
486+ }
487+ }
488+
489+ [ ConditionalFact ]
490+ [ MaximumOSVersion ( OperatingSystems . Windows , WindowsVersions . Win10_20H1 , SkipReason = "Shutdown hangs https://github.com/dotnet/aspnetcore/issues/25107" ) ]
491+ public async Task StartupTimeoutIsApplied_DisableRecycleOnStartupTimeout ( )
492+ {
493+ // From what we can tell, this failure is due to ungraceful shutdown.
494+ // The error could be the same as https://github.com/dotnet/core-setup/issues/4646
495+ // But can't be certain without another repro.
496+ using ( AppVerifier . Disable ( DeployerSelector . ServerType , 0x300 ) )
497+ {
498+ var deploymentParameters = Fixture . GetBaseDeploymentParameters ( Fixture . InProcessTestSite ) ;
499+ deploymentParameters . TransformArguments ( ( a , _ ) => $ "{ a } Hang") ;
500+ deploymentParameters . WebConfigActionList . Add (
501+ WebConfigHelpers . AddOrModifyAspNetCoreSection ( "startupTimeLimit" , "1" ) ) ;
502+ deploymentParameters . HandlerSettings [ "suppressRecycleOnStartupTimeout" ] = "true" ;
503+ var deploymentResult = await DeployAsync ( deploymentParameters ) ;
504+
505+ var response = await deploymentResult . HttpClient . GetAsync ( "/" ) ;
506+ Assert . Equal ( HttpStatusCode . InternalServerError , response . StatusCode ) ;
507+
473508 StopServer ( gracefulShutdown : false ) ;
474509
475- EventLogHelpers . VerifyEventLogEvents ( deploymentResult ,
476- EventLogHelpers . InProcessFailedToStart ( deploymentResult , "Managed server didn't initialize after 1000 ms." )
477- ) ;
510+ EventLogHelpers . VerifyEventLogEvent ( deploymentResult ,
511+ EventLogHelpers . InProcessFailedToStart ( deploymentResult , "Managed server didn't initialize after 1000 ms." ) ,
512+ Logger ) ;
478513
479514 if ( DeployerSelector . HasNewHandler )
480515 {
0 commit comments