Skip to content

Commit 2889326

Browse files
author
e2e
committed
test(windows): wait for descendant exit signal after job shutdown
1 parent f8f3bcb commit 2889326

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src-tauri/src/windows_process.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,8 +544,10 @@ mod tests {
544544
"server should complete its SIGTERM handler"
545545
);
546546
assert!(output.contains("graceful-shutdown"), "{output}");
547+
// Job accounting can reach zero just before the kernel signals
548+
// the last process handle. Require that signal within a bound.
547549
assert_eq!(
548-
unsafe { WaitForSingleObject(descendant.as_raw_handle(), 0) },
550+
unsafe { WaitForSingleObject(descendant.as_raw_handle(), 5_000) },
549551
WAIT_OBJECT_0
550552
);
551553
assert!(process.tree_is_empty().unwrap());

0 commit comments

Comments
 (0)