diff options
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, ()> { |
