mirror of
https://github.com/openai/codex.git
synced 2026-10-27 16:02:59 +00:00
Shut down Codex threads after approval scenarios (#33441)
## What changed - Explicitly shut down and wait for each approval scenario's Codex thread. - Preserve and return the scenario verification result after shutdown, so cleanup also runs when verification returns an error. GitOrigin-RevId: 78dfbe657700a47b457ea9abd5efec4edd8f8a25
This commit is contained in:
@@ -2000,9 +2000,9 @@ async fn run_scenario(scenario: &ScenarioSpec) -> Result<()> {
|
||||
"approval scenario {} result: exit_code={:?} stdout={:?}",
|
||||
scenario.name, result.exit_code, result.stdout
|
||||
);
|
||||
scenario.expectation.verify(&test, &result)?;
|
||||
|
||||
Ok(())
|
||||
let verification_result = scenario.expectation.verify(&test, &result);
|
||||
test.codex.shutdown_and_wait().await?;
|
||||
verification_result
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "current_thread")]
|
||||
|
||||
Reference in New Issue
Block a user