diff --git a/crates/tracedecay/tests/storage_suite/multi_connection_test/fail_closed.rs b/crates/tracedecay/tests/storage_suite/multi_connection_test/fail_closed.rs index cfe16b33c9c..e1fcc3f8cab 100644 --- a/crates/tracedecay/tests/storage_suite/multi_connection_test/fail_closed.rs +++ b/crates/tracedecay/tests/storage_suite/multi_connection_test/fail_closed.rs @@ -59,7 +59,7 @@ fn split_brain_is_rejected_and_unavailable_daemon_fails_closed_until_restart() { "rejected contender is still running after fail-closed rejection" ); - stop_child(&mut owner); + drop(owner); install_unavailable_socket_sentinel(&socket_path); let before = storage_snapshot(&profile_db_path); for (label, mut command) in [ @@ -142,7 +142,7 @@ fn split_brain_is_rejected_and_unavailable_daemon_fails_closed_until_restart() { &profile_db_path, ); - let mut restarted = spawn_daemon(&home_path, &socket_path); + let restarted = spawn_daemon(&home_path, &socket_path); assert_command_success( "restarted daemon status", &tool_status(&home_path, &project_path, &socket_path), @@ -161,5 +161,4 @@ fn split_brain_is_rejected_and_unavailable_daemon_fails_closed_until_restart() { authority_after["epoch"].as_u64() > authority_before["epoch"].as_u64(), "restart must advance daemon authority epoch" ); - stop_child(&mut restarted); } diff --git a/crates/tracedecay/tests/storage_suite/multi_connection_test/harness.rs b/crates/tracedecay/tests/storage_suite/multi_connection_test/harness.rs index 8fb0c7d7af5..3e05bc4da24 100644 --- a/crates/tracedecay/tests/storage_suite/multi_connection_test/harness.rs +++ b/crates/tracedecay/tests/storage_suite/multi_connection_test/harness.rs @@ -136,19 +136,13 @@ fn wait_for_socket(socket_path: &Path, child: &mut Child) { ); } -pub(super) fn spawn_daemon(home: &Path, socket_path: &Path) -> ChildGuard { - let mut child = ChildGuard::new( - common::tracedecay_command_with_home(home) - .args(["daemon", "run", "--socket"]) +pub(super) fn spawn_daemon(home: &Path, socket_path: &Path) -> common::DaemonProcess { + common::spawn_tracedecay_daemon_with(home, |command| { + command + .arg("--socket") .arg(socket_path) - .stdin(Stdio::null()) - .stdout(Stdio::null()) - .stderr(Stdio::null()) - .spawn() - .expect("spawn daemon"), - ); - wait_for_socket(socket_path, &mut child); - child + .env_remove("TRACEDECAY_TEST_ALLOW_INCOMPLETE_HOLDER_SCAN"); + }) } /// Where the spawned daemon's stderr was redirected, when the caller captured