mirror of
https://github.com/Dasemu/Grove.git
synced 2026-11-26 23:36:11 +00:00
fix(daemon): treat a repo whose directory vanishes mid-pass as removed, without error logs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3cba9784a3
commit
04750532f2
2 files changed
+13
-1
No files matched your search
@@ -610,7 +610,11 @@ fn managed_repo_removed_after_start_disappears_without_crash() {
|
||||
|
||||
// Keep the first repo busy so a pass may be running when the other one vanishes.
|
||||
fs::write(root.join("g/repo/main/busy.txt"), "x\n").unwrap();
|
||||
fs::remove_dir_all(root.join("g/second")).unwrap();
|
||||
// The daemon may create files in the repo while it is being deleted (ENOTEMPTY): retry.
|
||||
wait_until("repo directory removed", 5, || {
|
||||
let _ = fs::remove_dir_all(root.join("g/second"));
|
||||
!root.join("g/second").exists()
|
||||
});
|
||||
wait_until("removed repo dropped", 10, || {
|
||||
repo_paths(&sock) == vec![root.join("g/repo").display().to_string()]
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user