Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

fix unified_exec::tests::unified_exec_timeouts to use a more unique match value (#9414)

Alex Hornbyb877a2041e08
diff --git a/codex-rs/core/src/unified_exec/mod.rs b/codex-rs/core/src/unified_exec/mod.rs
index 42a08b571f..3f359c3866 100644
--- a/codex-rs/core/src/unified_exec/mod.rs
+++ b/codex-rs/core/src/unified_exec/mod.rs
@@ -354,6 +354,8 @@ mod tests {
async fn unified_exec_timeouts() -> anyhow::Result<()> {
skip_if_sandbox!(Ok(()));
+ const TEST_VAR_VALUE: &str = "unified_exec_var_123";
+
let (session, turn) = test_session_and_turn().await;
let open_shell = exec_command(&session, &turn, "bash -i", 2_500).await?;
@@ -366,7 +368,7 @@ mod tests {
write_stdin(
&session,
process_id,
- "export CODEX_INTERACTIVE_SHELL_VAR=codex\n",
+ format!("export CODEX_INTERACTIVE_SHELL_VAR={TEST_VAR_VALUE}\n").as_str(),
2_500,
)
.await?;
@@ -379,7 +381,7 @@ mod tests {
)
.await?;
assert!(
- !out_2.output.contains("codex"),
+ !out_2.output.contains(TEST_VAR_VALUE),
"timeout too short should yield incomplete output"
);
@@ -388,7 +390,7 @@ mod tests {
let out_3 = write_stdin(&session, process_id, "", 100).await?;
assert!(
- out_3.output.contains("codex"),
+ out_3.output.contains(TEST_VAR_VALUE),
"subsequent poll should retrieve output"
);