Skip to content

Stabilize debug clear memories integration test#18858

Merged
jif-oai merged 1 commit intomainfrom
jif/flix-flaky-test
Apr 21, 2026
Merged

Stabilize debug clear memories integration test#18858
jif-oai merged 1 commit intomainfrom
jif/flix-flaky-test

Conversation

@jif-oai
Copy link
Copy Markdown
Collaborator

@jif-oai jif-oai commented Apr 21, 2026

Why

debug_clear_memories_resets_state_and_removes_memory_dir can be flaky because the test drops its sqlx::SqlitePool immediately before invoking codex debug clear-memories. Dropping the pool does not wait for all SQLite connections to close, so the CLI can race with still-open test connections.

What changed

  • Await pool.close() before spawning codex debug clear-memories.
  • Close the reopened verification pool before the temp CODEX_HOME is torn down.

Verification

  • cargo test -p codex-cli --test debug_clear_memories debug_clear_memories_resets_state_and_removes_memory_dir

@jif-oai jif-oai changed the title fix: flaky test Stabilize debug clear memories integration test Apr 21, 2026
@jif-oai jif-oai merged commit 10e1659 into main Apr 21, 2026
25 checks passed
@jif-oai jif-oai deleted the jif/flix-flaky-test branch April 21, 2026 17:15
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants