@@ -3694,11 +3694,10 @@ async fn runner_lease_expiration_disconnect_reaper() {
36943694 * inner. job_requests . keys ( ) . next ( ) . unwrap ( )
36953695 } ;
36963696
3697- // Exercise the just-before-boundary case without sleeping. The session
3698- // must be dead here: a *live* session with a stale lease is the hung-
3699- // worker case (reaped at HUNG_WORKER_LEASE_SECONDS), not the disconnect
3700- // boundary this test isolates. Age the session past liveness so only the
3701- // lease clock decides.
3697+ // Exercise both sides of the disconnected-session lease boundary without
3698+ // sleeping. A *live* session with a stale lease is the hung-worker case
3699+ // (reaped at HUNG_WORKER_LEASE_SECONDS), not the disconnect boundary.
3700+ // Leave headroom for the reaper on loaded CI hosts.
37023701 let liveness = state. test_tx ( ) . await . runner_liveness_timeout ;
37033702 state
37043703 . test_db_mutate ( |tx| {
@@ -3708,7 +3707,7 @@ async fn runner_lease_expiration_disconnect_reaper() {
37083707 tx. set_lease_renewed (
37093708 request_id,
37103709 1 ,
3711- now - ( JOB_LEASE_SECONDS as i64 - 1 ) * 1_000_000 ,
3710+ now - ( DEAD_SESSION_LEASE_SECONDS as i64 - 30 ) * 1_000_000 ,
37123711 now + JOB_LEASE_SECONDS as i64 * 1_000_000 ,
37133712 )
37143713 . unwrap ( ) ;
@@ -3730,13 +3729,13 @@ async fn runner_lease_expiration_disconnect_reaper() {
37303729 ) ;
37313730 }
37323731
3733- // Move just beyond the same production lease boundary and reap.
3732+ // Move past the disconnected-session boundary and reap.
37343733 state
37353734 . test_db_mutate ( |tx| {
37363735 tx. set_lease_renewed (
37373736 request_id,
37383737 1 ,
3739- crate :: store:: now_us ( ) - ( JOB_LEASE_SECONDS as i64 + 1 ) * 1_000_000 ,
3738+ crate :: store:: now_us ( ) - ( DEAD_SESSION_LEASE_SECONDS as i64 + 30 ) * 1_000_000 ,
37403739 crate :: store:: now_us ( ) - 1_000_000 ,
37413740 )
37423741 . unwrap ( ) ;
0 commit comments