Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions crates/tui/src/tools/shell/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ fn env_lock() -> &'static Mutex<()> {
LOCK.get_or_init(|| Mutex::new(()))
}

const BACKGROUND_COMPLETION_WAIT_MS: u64 = 30_000;

fn echo_command(message: &str) -> String {
format!("echo {message}")
}
Expand Down Expand Up @@ -175,7 +177,7 @@ fn test_background_execution() {

// Wait for completion
let final_result = manager
.get_output(&task_id, true, 5000)
.get_output(&task_id, true, BACKGROUND_COMPLETION_WAIT_MS)
.expect("get_output");

assert_eq!(final_result.status, ShellStatus::Completed);
Expand Down Expand Up @@ -758,7 +760,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,
)
Expand Down
Loading