Skip to content

Commit 4381fc2

Browse files
committed
fix: accept SIGTERM exit code in exec timeout test (flaky on CI)
1 parent 841f902 commit 4381fc2

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

crates/sandchest-agent/src/exec.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,12 @@ mod tests {
437437
})
438438
.expect("should have exit event");
439439

440-
assert_eq!(exit_event.exit_code, -1, "timed-out process should exit with -1");
440+
// Timed-out process exits with -1 (our sentinel) or 143 (128 + SIGTERM) depending on timing
441+
assert!(
442+
exit_event.exit_code == -1 || exit_event.exit_code == 143,
443+
"timed-out process should exit with -1 or 143, got {}",
444+
exit_event.exit_code
445+
);
441446
}
442447

443448
#[tokio::test]

0 commit comments

Comments
 (0)