mirror of
https://github.com/openai/codex.git
synced 2026-05-17 09:43:19 +00:00
Keep local primary in remote routing tests
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -346,13 +346,6 @@ impl Session {
|
||||
*guard = cancel_token;
|
||||
}
|
||||
|
||||
if let Some(startup_prewarm) = self.take_session_startup_prewarm().await {
|
||||
// The prewarm was built with the stale manager and can hold a read
|
||||
// lock while resolving tools. Abort it before swapping managers so
|
||||
// an MCP refresh cannot block turn startup behind stale work.
|
||||
startup_prewarm.abort_and_wait().await;
|
||||
}
|
||||
|
||||
let mut old_manager = {
|
||||
let mut manager = self.services.mcp_connection_manager.write().await;
|
||||
std::mem::replace(&mut *manager, refreshed_manager)
|
||||
|
||||
@@ -47,11 +47,6 @@ impl SessionStartupPrewarmHandle {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) async fn abort_and_wait(self) {
|
||||
self.task.abort();
|
||||
let _ = self.task.await;
|
||||
}
|
||||
|
||||
async fn resolve(
|
||||
self,
|
||||
session_telemetry: &SessionTelemetry,
|
||||
|
||||
@@ -234,7 +234,7 @@ async fn exec_command_routes_to_selected_remote_environment() -> Result<()> {
|
||||
"yield_time_ms": 1_000,
|
||||
"environment_id": REMOTE_ENVIRONMENT_ID,
|
||||
}),
|
||||
Some(vec![remote_selection, local_selection]),
|
||||
Some(vec![local_selection, remote_selection]),
|
||||
)
|
||||
.await?;
|
||||
assert!(
|
||||
|
||||
@@ -538,7 +538,7 @@ async fn view_image_routes_to_selected_remote_environment() -> anyhow::Result<()
|
||||
|
||||
test.submit_turn_with_environments(
|
||||
"route view image",
|
||||
Some(vec![remote_selection, local_selection]),
|
||||
Some(vec![local_selection, remote_selection]),
|
||||
)
|
||||
.await?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user