[codex] Wait for MCP readiness in core integration tests (#24964)

Ensures MCP-backed `codex-core` integration tests exercise initialized
servers instead of racing server startup.

I've been idly investigating a few flakes and the failure modes are much
more confusing when a tool call fails because of a failed server start
than when the failed server start causes the test to fail directly.
This commit is contained in:
Adam Perry @ OpenAI
2026-05-29 10:22:27 -07:00
committed by GitHub
parent e29bbb5368
commit 3e666dd32a
8 changed files with 73 additions and 85 deletions
+2
View File
@@ -38,6 +38,7 @@ use core_test_support::test_codex::test_codex;
use core_test_support::test_codex::turn_permission_fields;
use core_test_support::wait_for_event;
use core_test_support::wait_for_event_match;
use core_test_support::wait_for_mcp_server;
use pretty_assertions::assert_eq;
use serde_json::Value;
use std::collections::HashMap;
@@ -283,6 +284,7 @@ async fn run_code_mode_turn_with_rmcp_config(
.expect("test mcp servers should accept any configuration");
});
let test = builder.build(server).await?;
wait_for_mcp_server(&test.codex, "rmcp").await?;
responses::mount_sse_once(
server,