diff --git a/crates/tui/src/tools/shell/tests.rs b/crates/tui/src/tools/shell/tests.rs index 46b7c35b..9708ea56 100644 --- a/crates/tui/src/tools/shell/tests.rs +++ b/crates/tui/src/tools/shell/tests.rs @@ -21,6 +21,8 @@ fn env_lock() -> &'static Mutex<()> { LOCK.get_or_init(|| Mutex::new(())) } +const BACKGROUND_COMPLETION_WAIT_MS: u64 = 30_000; + #[cfg(windows)] const JOB_OBJECT_QUERY_ACCESS: u32 = 0x0004; @@ -133,7 +135,7 @@ fn failed_network_shell_result(stdout: &str, stderr: &str) -> ShellResult { } fn wait_for_completed_shell(manager: &mut ShellManager, task_id: &str) -> ShellResult { - let deadline = Instant::now() + Duration::from_secs(20); + let deadline = Instant::now() + Duration::from_millis(BACKGROUND_COMPLETION_WAIT_MS); loop { let result = manager @@ -801,7 +803,7 @@ async fn test_completed_background_shell_releases_process_handles() { json!({ "task_id": task_id.clone(), "wait": true, - "timeout_ms": 5_000 + "timeout_ms": BACKGROUND_COMPLETION_WAIT_MS }), &ctx, )