mirror of
https://github.com/openai/codex.git
synced 2026-09-08 15:50:34 +00:00
test: shorten optional fs watch event wait
This commit is contained in:
@@ -33,6 +33,7 @@ use std::process::Command;
|
||||
const DEFAULT_READ_TIMEOUT: Duration = Duration::from_secs(60);
|
||||
#[cfg(not(any(target_os = "macos", windows)))]
|
||||
const DEFAULT_READ_TIMEOUT: Duration = Duration::from_secs(10);
|
||||
const OPTIONAL_FS_CHANGED_TIMEOUT: Duration = Duration::from_millis(1500);
|
||||
|
||||
async fn initialized_mcp(codex_home: &TempDir) -> Result<McpProcess> {
|
||||
let mut mcp = McpProcess::new(codex_home.path()).await?;
|
||||
@@ -832,7 +833,7 @@ async fn maybe_fs_changed_notification(
|
||||
mcp: &mut McpProcess,
|
||||
) -> Result<Option<FsChangedNotification>> {
|
||||
match timeout(
|
||||
DEFAULT_READ_TIMEOUT,
|
||||
OPTIONAL_FS_CHANGED_TIMEOUT,
|
||||
mcp.read_stream_until_notification_message("fs/changed"),
|
||||
)
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user