Skip to content

Commit 1a56abb

Browse files
committed
Rename sigint to terminate
It no longer just sends a sigint, so rename it to something more descriptive.
1 parent 4f4432b commit 1a56abb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

payjoin-cli/tests/e2e.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ mod e2e {
1010
use tokio::io::{AsyncBufReadExt, AsyncWriteExt, BufReader};
1111
use tokio::process::Command;
1212

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> {
1414
let pid = child.id().expect("Failed to get child PID");
1515
kill(Pid::from_raw(pid as i32), Signal::SIGINT)?;
1616
// wait for child process to exit completely
@@ -121,8 +121,8 @@ mod e2e {
121121
.unwrap_or(Some(false)) // timed out
122122
.expect("rx channel closed prematurely"); // recv() returned None
123123

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");
126126

127127
payjoin_sent
128128
})
@@ -275,7 +275,7 @@ mod e2e {
275275
.expect("payjoin-cli receiver should output a bitcoin URI");
276276
log::debug!("Got bip21 {}", &bip21);
277277

278-
sigint(cli_receiver).await.expect("Failed to kill payjoin-cli");
278+
terminate(cli_receiver).await.expect("Failed to kill payjoin-cli");
279279
bip21
280280
}
281281

@@ -289,7 +289,7 @@ mod e2e {
289289
)
290290
.await?;
291291

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");
293293
assert!(res.is_some(), "Fallback send was not detected");
294294
Ok(())
295295
}
@@ -304,7 +304,7 @@ mod e2e {
304304
)
305305
.await?;
306306

307-
sigint(cli_receive_resumer).await.expect("Failed to kill payjoin-cli");
307+
terminate(cli_receive_resumer).await.expect("Failed to kill payjoin-cli");
308308
assert!(res.is_some(), "Did not respond with Payjoin PSBT");
309309
Ok(())
310310
}
@@ -319,7 +319,7 @@ mod e2e {
319319
)
320320
.await?;
321321

322-
sigint(cli_send_resumer).await.expect("Failed to kill payjoin-cli");
322+
terminate(cli_send_resumer).await.expect("Failed to kill payjoin-cli");
323323
assert!(res.is_some(), "Payjoin send was not detected");
324324
Ok(())
325325
}

0 commit comments

Comments
 (0)