Skip to content

Commit 07e4be8

Browse files
committed
tests: fix clippy::zombie_processes findings
of the form: ``` error: spawned process is never `wait()`ed on --> tests/tests.rs:47:19 | 47 | let mut srv = server_command() | ___________________^ 48 | | .arg("1337") 49 | | .spawn() 50 | | .expect("cannot run server example"); | |____________________________________________^ | = note: consider calling `.wait()` = note: not doing so might leave behind zombie processes = note: see https://doc.rust-lang.org/stable/std/process/struct.Child.html#warning = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zombie_processes = note: `-D clippy::zombie-processes` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::zombie_processes)]` ```
1 parent 03fe2db commit 07e4be8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/tests.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ fn server() {
6060
.expect("cannot run curl");
6161

6262
srv.kill().unwrap();
63+
srv.wait()
64+
.expect("failed to wait on server process");
6365

6466
if !output.status.success() {
6567
let version_stdout = Command::new("curl")
@@ -91,6 +93,8 @@ fn custom_ca_store() {
9193
.expect("cannot run client example");
9294

9395
srv.kill().unwrap();
96+
srv.wait()
97+
.expect("failed to wait on server process");
9498

9599
if !rc.status.success() {
96100
assert_eq!(String::from_utf8_lossy(&rc.stdout), "");

0 commit comments

Comments
 (0)