Files
buzz/desktop/src-tauri
Duncan b946f65d38 fix(personas): serialize HOME-mutating tests to eliminate race condition
Three async tests in concurrent_edit_tests.rs used std::env::set_var("HOME")
for store isolation but held lock_path_mutex() only in a setup block, releasing
it before the actual I/O. When the tokio test runner executed them concurrently,
tests raced on the process-global HOME env var and read from each other's temp
directories.

Fix: convert all three from #[tokio::test] async fn to #[test] fn with an
explicit single-threaded tokio runtime (block_on). lock_path_mutex() is now
held at fn scope for the full test duration — no MutexGuard across await, no
clippy flag, and the mutex serializes the three tests so HOME cannot be
clobbered mid-run.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
2026-09-01 11:43:38 -04:00
..