@@ -276,7 +276,9 @@ async fn router_enforces_exact_browser_origins_csrf_and_public_client_cors_bound
276276#[ tokio:: test]
277277#[ ignore = "requires TEST_DATABASE_URL" ]
278278async fn optional_session_preserves_database_failure_instead_of_reporting_signed_out ( ) {
279- let database = SecurityFixture :: database ( 1 , std:: time:: Duration :: from_millis ( 50 ) ) . await ;
279+ // The timeout also bounds the first connection, so it leaves room for
280+ // connecting while other database tests run.
281+ let database = SecurityFixture :: database ( 1 , std:: time:: Duration :: from_secs ( 1 ) ) . await ;
280282 // Exhaust only this test's private pool; the database and all other tests
281283 // remain usable. A well-formed session cookie must trigger a real lookup.
282284 let transaction = database. begin ( ) . await . expect ( "hold sole connection" ) ;
@@ -347,15 +349,17 @@ async fn rate_limit_deadline_includes_a_blocked_database_query() {
347349 . allow_request ( bucket. as_bytes ( ) , 120 )
348350 . await
349351 . expect ( "hold bucket lock" ) ;
350- fixture. policy . request_timeout = std:: time:: Duration :: from_millis ( 100 ) ;
352+ // The deadline also bounds the request after the lock is released, so it
353+ // leaves room for queries while other database tests run.
354+ fixture. policy . request_timeout = std:: time:: Duration :: from_secs ( 1 ) ;
351355 fixture. router = Router :: new ( )
352356 . route ( "/oauth/token" , any ( || async { StatusCode :: ACCEPTED } ) )
353357 . layer ( middleware:: from_fn_with_state (
354358 fixture. policy . clone ( ) ,
355359 HttpSecurity :: protect,
356360 ) ) ;
357361 let response = tokio:: time:: timeout (
358- std:: time:: Duration :: from_secs ( 2 ) ,
362+ std:: time:: Duration :: from_secs ( 5 ) ,
359363 fixture. request ( Method :: POST , "/oauth/token" , None , false ) ,
360364 )
361365 . await
0 commit comments