@@ -12,6 +12,7 @@ use std::net::Ipv4Addr;
1212use std:: net:: SocketAddr ;
1313use std:: path:: PathBuf ;
1414use std:: str:: FromStr ;
15+ use std:: sync:: atomic:: AtomicBool ;
1516use std:: sync:: Arc ;
1617use std:: time:: Duration ;
1718
@@ -265,6 +266,7 @@ async fn test_not_trigger_pku_sigsegv_due_to_jit_compilation_non_cli() {
265266 req,
266267 res_tx,
267268 conn_token : Some ( conn_token. clone ( ) ) ,
269+ idle_timed_out : Arc :: new ( AtomicBool :: new ( false ) ) ,
268270 } ;
269271
270272 let _ = surface. msg_tx . send ( msg) ;
@@ -549,6 +551,7 @@ async fn test_main_worker_user_worker_mod_evaluate_exception() {
549551 req,
550552 res_tx,
551553 conn_token : Some ( conn_token. clone ( ) ) ,
554+ idle_timed_out : Arc :: new ( AtomicBool :: new ( false ) ) ,
552555 } ;
553556
554557 let _ = surface. msg_tx . send ( msg) ;
@@ -1893,7 +1896,15 @@ async fn test_request_idle_timeout_no_streamed_response(
18931896 request_builder,
18941897 maybe_tls,
18951898 ( |resp| async {
1896- assert_eq!( resp. unwrap( ) . status( ) . as_u16( ) , StatusCode :: GATEWAY_TIMEOUT ) ;
1899+ let resp = resp. unwrap( ) ;
1900+ assert_eq!( resp. status( ) . as_u16( ) , StatusCode :: GATEWAY_TIMEOUT ) ;
1901+ let body = resp. bytes( ) . await . unwrap( ) ;
1902+ assert!(
1903+ std:: str :: from_utf8( & body)
1904+ . unwrap( )
1905+ . contains( "WorkerRequestIdleTimeout" ) ,
1906+ "expected WorkerRequestIdleTimeout in body"
1907+ ) ;
18971908 } ) ,
18981909 TerminationToken :: new( )
18991910 ) ;
0 commit comments