diff --git a/codex-rs/core/tests/suite/request_permissions_tool.rs b/codex-rs/core/tests/suite/request_permissions_tool.rs index e8434896ea..b02459c8cd 100644 --- a/codex-rs/core/tests/suite/request_permissions_tool.rs +++ b/codex-rs/core/tests/suite/request_permissions_tool.rs @@ -38,6 +38,7 @@ use serde_json::Value; use serde_json::json; use std::fs; use std::path::Path; +use test_case::test_case; fn absolute_path(path: &Path) -> AbsolutePathBuf { AbsolutePathBuf::try_from(path).expect("absolute path") @@ -328,16 +329,17 @@ async fn approved_folder_write_request_permissions_unblocks_later_exec_without_s Ok(()) } -#[tokio::test(flavor = "current_thread")] +#[test_case(false ; "without_strict_auto_review")] +#[test_case(true ; "with_strict_auto_review")] +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] #[cfg(target_os = "macos")] -async fn approved_folder_write_request_permissions_unblocks_later_apply_patch() -> Result<()> { +async fn approved_folder_write_request_permissions_unblocks_later_apply_patch( + strict_auto_review: bool, +) -> Result<()> { skip_if_no_network!(Ok(())); skip_if_sandbox!(Ok(())); - apply_patch_after_request_permissions(/*strict_auto_review*/ false).await?; - apply_patch_after_request_permissions(/*strict_auto_review*/ true).await?; - - Ok(()) + apply_patch_after_request_permissions(strict_auto_review).await } async fn apply_patch_after_request_permissions(strict_auto_review: bool) -> Result<()> { @@ -510,5 +512,7 @@ async fn apply_patch_after_request_permissions(strict_auto_review: bool) -> Resu format!("{patch_content}\n") ); + test.codex.shutdown_and_wait().await?; + Ok(()) }