@@ -13,14 +13,6 @@ mod tests {
1313 assert ! ( result. is_ok( ) , "Should be able to create SIGTERM handler" ) ;
1414 }
1515
16- /// Test that SIGINT signal handler can be created (Unix only)
17- #[ tokio:: test]
18- #[ cfg( unix) ]
19- async fn test_sigint_handler_creation ( ) {
20- let result = signal:: unix:: signal ( signal:: unix:: SignalKind :: interrupt ( ) ) ;
21- assert ! ( result. is_ok( ) , "Should be able to create SIGINT handler" ) ;
22- }
23-
2416 /// Test that Ctrl+C handler can be created
2517 #[ tokio:: test]
2618 async fn test_ctrl_c_handler_creation ( ) {
@@ -89,34 +81,25 @@ mod tests {
8981 assert ! ( result. is_ok( ) , "Shutdown signal branch should be selected" ) ;
9082 }
9183
92- /// Test that multiple signal handlers can be created simultaneously (Unix only)
84+ /// Test that SIGTERM and Ctrl+C handlers can be created simultaneously (Unix only)
9385 #[ tokio:: test]
9486 #[ cfg( unix) ]
95- async fn test_multiple_signal_handlers ( ) {
87+ async fn test_sigterm_and_ctrl_c_handlers ( ) {
9688 let sigterm_result = signal:: unix:: signal ( signal:: unix:: SignalKind :: terminate ( ) ) ;
97- let sigint_result = signal:: unix:: signal ( signal:: unix:: SignalKind :: interrupt ( ) ) ;
9889
9990 assert ! (
10091 sigterm_result. is_ok( ) ,
10192 "Should be able to create SIGTERM handler"
10293 ) ;
103- assert ! (
104- sigint_result. is_ok( ) ,
105- "Should be able to create SIGINT handler"
106- ) ;
10794
108- // Test that we can set up the same pattern as in main.rs
95+ // Test that we can set up the same pattern as in main.rs (SIGTERM + ctrl_c)
10996 let shutdown_signal = async {
11097 let mut sigterm = sigterm_result. unwrap ( ) ;
111- let mut sigint = sigint_result. unwrap ( ) ;
11298
11399 tokio:: select! {
114100 _ = sigterm. recv( ) => {
115101 println!( "=== TEST: SIGTERM received ===" ) ;
116102 }
117- _ = sigint. recv( ) => {
118- println!( "=== TEST: SIGINT received ===" ) ;
119- }
120103 _ = signal:: ctrl_c( ) => {
121104 println!( "=== TEST: Ctrl+C received ===" ) ;
122105 }
0 commit comments