@@ -10,7 +10,7 @@ mod e2e {
10
10
use tokio:: io:: { AsyncBufReadExt , AsyncWriteExt , BufReader } ;
11
11
use tokio:: process:: Command ;
12
12
13
- async fn sigint ( mut child : tokio:: process:: Child ) -> tokio:: io:: Result < ExitStatus > {
13
+ async fn terminate ( mut child : tokio:: process:: Child ) -> tokio:: io:: Result < ExitStatus > {
14
14
let pid = child. id ( ) . expect ( "Failed to get child PID" ) ;
15
15
kill ( Pid :: from_raw ( pid as i32 ) , Signal :: SIGINT ) ?;
16
16
// wait for child process to exit completely
@@ -121,8 +121,8 @@ mod e2e {
121
121
. unwrap_or ( Some ( false ) ) // timed out
122
122
. expect ( "rx channel closed prematurely" ) ; // recv() returned None
123
123
124
- sigint ( cli_receiver) . await . expect ( "Failed to kill payjoin-cli" ) ;
125
- sigint ( cli_sender) . await . expect ( "Failed to kill payjoin-cli" ) ;
124
+ terminate ( cli_receiver) . await . expect ( "Failed to kill payjoin-cli" ) ;
125
+ terminate ( cli_sender) . await . expect ( "Failed to kill payjoin-cli" ) ;
126
126
127
127
payjoin_sent
128
128
} )
@@ -275,7 +275,7 @@ mod e2e {
275
275
. expect ( "payjoin-cli receiver should output a bitcoin URI" ) ;
276
276
log:: debug!( "Got bip21 {}" , & bip21) ;
277
277
278
- sigint ( cli_receiver) . await . expect ( "Failed to kill payjoin-cli" ) ;
278
+ terminate ( cli_receiver) . await . expect ( "Failed to kill payjoin-cli" ) ;
279
279
bip21
280
280
}
281
281
@@ -289,7 +289,7 @@ mod e2e {
289
289
)
290
290
. await ?;
291
291
292
- sigint ( cli_sender) . await . expect ( "Failed to kill payjoin-cli initial sender" ) ;
292
+ terminate ( cli_sender) . await . expect ( "Failed to kill payjoin-cli initial sender" ) ;
293
293
assert ! ( res. is_some( ) , "Fallback send was not detected" ) ;
294
294
Ok ( ( ) )
295
295
}
@@ -304,7 +304,7 @@ mod e2e {
304
304
)
305
305
. await ?;
306
306
307
- sigint ( cli_receive_resumer) . await . expect ( "Failed to kill payjoin-cli" ) ;
307
+ terminate ( cli_receive_resumer) . await . expect ( "Failed to kill payjoin-cli" ) ;
308
308
assert ! ( res. is_some( ) , "Did not respond with Payjoin PSBT" ) ;
309
309
Ok ( ( ) )
310
310
}
@@ -319,7 +319,7 @@ mod e2e {
319
319
)
320
320
. await ?;
321
321
322
- sigint ( cli_send_resumer) . await . expect ( "Failed to kill payjoin-cli" ) ;
322
+ terminate ( cli_send_resumer) . await . expect ( "Failed to kill payjoin-cli" ) ;
323
323
assert ! ( res. is_some( ) , "Payjoin send was not detected" ) ;
324
324
Ok ( ( ) )
325
325
}
0 commit comments