Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

fix: flaky tests 5 (#8282)

jif-oai87abf06e78ba
diff --git a/codex-rs/core/tests/suite/shell_snapshot.rs b/codex-rs/core/tests/suite/shell_snapshot.rs
index cee44f0d90..8357fb8a95 100644
--- a/codex-rs/core/tests/suite/shell_snapshot.rs
+++ b/codex-rs/core/tests/suite/shell_snapshot.rs
@@ -22,6 +22,8 @@ use pretty_assertions::assert_eq;
use serde_json::json;
use std::path::PathBuf;
use tokio::fs;
+use tokio::time::Duration;
+use tokio::time::sleep;
#[derive(Debug)]
struct SnapshotRun {
@@ -333,6 +335,7 @@ async fn shell_snapshot_deleted_after_shutdown_with_skills() -> Result<()> {
drop(codex);
drop(harness);
+ sleep(Duration::from_millis(150)).await;
assert_eq!(
snapshot_path.exists(),