Skip to content

Commit

Permalink
tests: fix clippy::zombie_processes findings
Browse files Browse the repository at this point in the history
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)]`
```
  • Loading branch information
cpu committed Nov 28, 2024
1 parent 03fe2db commit 4e3c6f1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ fn server() {
.expect("cannot run curl");

srv.kill().unwrap();
srv.wait().expect("failed to wait on server process");

if !output.status.success() {
let version_stdout = Command::new("curl")
Expand Down Expand Up @@ -91,6 +92,7 @@ fn custom_ca_store() {
.expect("cannot run client example");

srv.kill().unwrap();
srv.wait().expect("failed to wait on server process");

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

0 comments on commit 4e3c6f1

Please sign in to comment.