From 652fbf2d9dc40071f9c9b53ddaa24f136363366c Mon Sep 17 00:00:00 2001 From: --global Date: Wed, 10 May 2023 12:36:32 -0400 Subject: [PATCH] Fixed test by killing process when test is done --- crates/turborepo-lib/src/daemon/endpoint.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/turborepo-lib/src/daemon/endpoint.rs b/crates/turborepo-lib/src/daemon/endpoint.rs index 019a2af135858..3a27f0da42472 100644 --- a/crates/turborepo-lib/src/daemon/endpoint.rs +++ b/crates/turborepo-lib/src/daemon/endpoint.rs @@ -222,7 +222,7 @@ mod test { #[cfg(not(windows))] let node_bin = "node"; - let child = Command::new(node_bin).spawn().unwrap(); + let mut child = Command::new(node_bin).spawn().unwrap(); pid_path .create_with_contents(format!("{}", child.id()).as_ref()) .unwrap(); @@ -236,5 +236,7 @@ mod test { } else { panic!("expected an error") } + + child.kill().unwrap(); } }