mirror of
https://github.com/openai/codex.git
synced 2026-05-16 09:12:54 +00:00
Harden Windows realtime and agent resume tests
Avoid PowerShell command forms that depend on method invocation for the delegated realtime shell-tool test, and wait for a shutdown status before resuming the same subagent thread in the nickname/role restore test. Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -2154,10 +2154,10 @@ fn realtime_tool_ok_command() -> Vec<String> {
|
||||
#[cfg(windows)]
|
||||
{
|
||||
vec![
|
||||
"powershell.exe".to_string(),
|
||||
"-NoProfile".to_string(),
|
||||
"-Command".to_string(),
|
||||
"[Console]::Write('realtime-tool-ok')".to_string(),
|
||||
"cmd.exe".to_string(),
|
||||
"/D".to_string(),
|
||||
"/C".to_string(),
|
||||
"echo(|set /p dummy=realtime-tool-ok".to_string(),
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -1631,6 +1631,22 @@ async fn resume_thread_subagent_restores_stored_nickname_and_role() {
|
||||
.shutdown_live_agent(child_thread_id)
|
||||
.await
|
||||
.expect("child shutdown should submit");
|
||||
if !matches!(status_rx.borrow().clone(), AgentStatus::Shutdown) {
|
||||
timeout(Duration::from_secs(5), async {
|
||||
loop {
|
||||
status_rx
|
||||
.changed()
|
||||
.await
|
||||
.expect("child status should reach shutdown");
|
||||
if matches!(status_rx.borrow().clone(), AgentStatus::Shutdown) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
})
|
||||
.await
|
||||
.expect("child should shut down before resume");
|
||||
}
|
||||
drop(child_thread);
|
||||
|
||||
let resumed_thread_id = harness
|
||||
.control
|
||||
|
||||
Reference in New Issue
Block a user