test(shell): #2528 widen background completion wait

Widen the focused background-shell completion wait used by shell tests so slow Windows runners do not leave lightweight background commands reported as Running before assertions fire.

Refs #2525

Refs #2526

Harvested from PR #2528 by @cyq1017

Co-authored-by: cyq1017 <61975706+cyq1017@users.noreply.github.com>
This commit is contained in:
Hunter B
2026-06-04 19:34:52 -07:00
parent c00d5aa526
commit cbb1142497
+4 -2
View File
@@ -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,
)