Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

fix: increase timeout to account for slow PowerShell startup (#16608)

Michael Bolin5d64e58a3803
diff --git a/codex-rs/mcp-server/tests/suite/codex_tool.rs b/codex-rs/mcp-server/tests/suite/codex_tool.rs
index 04763b884c..f8896864bc 100644
--- a/codex-rs/mcp-server/tests/suite/codex_tool.rs
+++ b/codex-rs/mcp-server/tests/suite/codex_tool.rs
@@ -60,17 +60,24 @@ async fn shell_command_approval_triggers_elicitation() -> anyhow::Result<()> {
.path()
.join(created_filename);
- let shell_command = if cfg!(windows) {
- vec![
- "New-Item".to_string(),
- "-ItemType".to_string(),
- "File".to_string(),
- "-Path".to_string(),
- created_filename.to_string(),
- "-Force".to_string(),
- ]
+ let (shell_command, timeout_ms) = if cfg!(windows) {
+ (
+ vec![
+ "New-Item".to_string(),
+ "-ItemType".to_string(),
+ "File".to_string(),
+ "-Path".to_string(),
+ created_filename.to_string(),
+ "-Force".to_string(),
+ ],
+ // `powershell.exe` startup can be slow on loaded Windows CI workers
+ 10_000,
+ )
} else {
- vec!["touch".to_string(), created_filename.to_string()]
+ (
+ vec!["touch".to_string(), created_filename.to_string()],
+ 5_000,
+ )
};
let expected_shell_command =
format_with_current_shell(&shlex::try_join(shell_command.iter().map(String::as_str))?);
@@ -83,7 +90,7 @@ async fn shell_command_approval_triggers_elicitation() -> anyhow::Result<()> {
create_shell_command_sse_response(
shell_command.clone(),
Some(workdir_for_shell_function_call.path()),
- Some(5_000),
+ Some(timeout_ms),
"call1234",
)?,
create_final_assistant_message_sse_response("File created!")?,