mirror of
https://github.com/openai/codex.git
synced 2026-04-26 15:45:02 +00:00
Adjust shell command timeouts for Windows (#11247)
Summary - add platform-aware defaults for shell command timeouts so Windows tests get longer waits - keep medium timeout longer on Windows to ensure flakiness is reduced Testing - Not run (not requested)
This commit is contained in:
@@ -17,8 +17,14 @@ use core_test_support::test_codex::test_codex;
|
||||
use serde_json::json;
|
||||
use test_case::test_case;
|
||||
|
||||
/// Use this timeout if, empirically, a test seems to need more time than the
|
||||
/// default.
|
||||
#[cfg(windows)]
|
||||
const DEFAULT_SHELL_TIMEOUT_MS: i64 = 7_000;
|
||||
#[cfg(not(windows))]
|
||||
const DEFAULT_SHELL_TIMEOUT_MS: i64 = 2_000;
|
||||
|
||||
#[cfg(windows)]
|
||||
const MEDIUM_TIMEOUT: Duration = Duration::from_secs(10);
|
||||
#[cfg(not(windows))]
|
||||
const MEDIUM_TIMEOUT: Duration = Duration::from_secs(5);
|
||||
|
||||
fn shell_responses_with_timeout(
|
||||
@@ -50,7 +56,7 @@ fn shell_responses_with_timeout(
|
||||
}
|
||||
|
||||
fn shell_responses(call_id: &str, command: &str, login: Option<bool>) -> Vec<String> {
|
||||
shell_responses_with_timeout(call_id, command, login, 2_000)
|
||||
shell_responses_with_timeout(call_id, command, login, DEFAULT_SHELL_TIMEOUT_MS)
|
||||
}
|
||||
|
||||
async fn shell_command_harness_with(
|
||||
|
||||
Reference in New Issue
Block a user