diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-04-21 19:11:22 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-04-21 19:11:22 +0300 |
| commit | 34138bbc3843afb8a89321db0acae797e352b04e (patch) | |
| tree | 48b1bff66b11d86ad02eb018187b329db1180d46 /tests/multi_client.rs | |
| parent | d45dd05f75efcfd6f0cacfe21de033602ce1b6f4 (diff) | |
fix: restore headless test reliability on macos
Diffstat (limited to 'tests/multi_client.rs')
| -rw-r--r-- | tests/multi_client.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/multi_client.rs b/tests/multi_client.rs index dee24f08..46eca891 100644 --- a/tests/multi_client.rs +++ b/tests/multi_client.rs @@ -63,7 +63,13 @@ fn cleanup_spawned_herdr(spawned: SpawnedHerdr, base: PathBuf) { fn wait_for_child_exit(child: &mut Box<dyn Child + Send + Sync>) { let _ = child.kill(); - let _ = child.wait(); + let deadline = Instant::now() + Duration::from_secs(5); + while Instant::now() < deadline { + if child.try_wait().ok().flatten().is_some() { + return; + } + thread::sleep(Duration::from_millis(25)); + } } fn test_lock() -> MutexGuard<'static, ()> { |
