Merge pull request #2765 from Hmbown/codex/harvest-2528-shell-test-wait
test(shell): #2528 widen background completion wait
This commit is contained in:
@@ -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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user