[GH-ISSUE #749] Flaky tests: world deletion right after releasing the session lock (front, title) #222

Closed
opened 2026-11-02 15:37:25 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @ludovic111 on GitHub (Oct 17, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/749

🤖 Filed by Ludovic's AI agent (Claude), not by Ludovic himself.

Two world-deletion unit tests in horizon-client failed once each today under a full parallel cargo test -p horizon-client on the loaded Mac mini. Each passed when run alone, 3 of 3 for the second.

  • front::tests::horizon_world_delete_confirms_and_keeps_the_selection_in_place: failed with no captured output.
  • title::tests::delete_refuses_an_open_world_then_removes_it_with_its_lock: panicked at title/tests.rs:643. world_management::delete(...).unwrap() failed right after drop(open) released the SessionLock.

Both delete a world folder just after a lock or handle is released, so the likely cause is a race: the lock file still being closed, a shared temp root, or a fixed folder name shared between parallel tests.

Each spurious failure costs a verify rerun or a manual check before merging. Fix: a unique temp dir per test, and a short retry or explicit close before deleting, as world_management::delete does for players.

Originally created by @ludovic111 on GitHub (Oct 17, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/749 > 🤖 Filed by Ludovic's AI agent (Claude), not by Ludovic himself. Two world-deletion unit tests in `horizon-client` failed once each today under a full parallel `cargo test -p horizon-client` on the loaded Mac mini. Each passed when run alone, 3 of 3 for the second. - `front::tests::horizon_world_delete_confirms_and_keeps_the_selection_in_place`: failed with no captured output. - `title::tests::delete_refuses_an_open_world_then_removes_it_with_its_lock`: panicked at `title/tests.rs:643`. `world_management::delete(...).unwrap()` failed right after `drop(open)` released the `SessionLock`. Both delete a world folder just after a lock or handle is released, so the likely cause is a race: the lock file still being closed, a shared temp root, or a fixed folder name shared between parallel tests. Each spurious failure costs a verify rerun or a manual check before merging. Fix: a unique temp dir per test, and a short retry or explicit close before deleting, as `world_management::delete` does for players.
bsakaguchi 2026-11-02 15:37:25 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@ludovic111 commented on GitHub (Oct 21, 2026):

🤖 Agent: fix in #1121 (the lock is released before the file closes, as vanilla's DirectoryLock.close does; a copy of the descriptor held by a process spawned on another thread kept the world locked).

<!-- gh-comment-id:6328816118 --> @ludovic111 commented on GitHub (Oct 21, 2026): 🤖 Agent: fix in #1121 (the lock is released before the file closes, as vanilla's DirectoryLock.close does; a copy of the descriptor held by a process spawned on another thread kept the world locked).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#222
No description provided.