mirror of
https://github.com/storytold/craft-launcher.git
synced 2026-11-12 05:03:07 +00:00
Resolve Unix restart test helpers through PATH (#424)
Assisted-by: OpenAI Codex (GPT-6) Signed-off-by: IanHollow <72767437+IanHollow@users.noreply.github.com>
This commit is contained in:
1 parent
07f4f2959c
commit
f1fe597eca
1 file changed
+2
-2
@@ -1072,8 +1072,8 @@ mod tests {
|
||||
fn the_restart_waits_for_the_old_process_to_exit() {
|
||||
let dir = tempfile::tempdir().unwrap();
|
||||
let marker = dir.path().join("started");
|
||||
let mut old = std::process::Command::new("/bin/sleep").arg("1").spawn().unwrap();
|
||||
relaunch_after_exit(old.id(), &[std::ffi::OsStr::new("/usr/bin/touch"), marker.as_os_str()]).unwrap();
|
||||
let mut old = std::process::Command::new("sleep").arg("1").spawn().unwrap();
|
||||
relaunch_after_exit(old.id(), &[std::ffi::OsStr::new("touch"), marker.as_os_str()]).unwrap();
|
||||
std::thread::sleep(std::time::Duration::from_millis(400));
|
||||
assert!(!marker.exists(), "started while the old launcher was still running");
|
||||
old.wait().unwrap();
|
||||
|
||||
Reference in new issue
Block a user