Skip to content

Commit b069a95

Browse files
fix(test): peer-C Windows 清理加 maxRetries —— rmSync 偶发 EPERM
Windows 上 8 个 SQLite 子进程退出后 -shm/-wal 句柄延迟释放, finally 里 rmSync 删临时目录偶发 EPERM(Linux 不触发)。测试逻辑本身 全通过(generation==80 断言绿),仅清理环节挂。Node fs.rmSync 的 maxRetries 对 EPERM/EBUSY 自动重试,一行修复,不动并发逻辑。 Co-Authored-By: Anans-Ivresse <[email protected]>
1 parent 51c32d2 commit b069a95

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎dsh-mneme/test/peer-blockers.test.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ test("peer-C: 多进程并发原子递增——8 进程×10 次 incrementGenerat
114114
store.close();
115115
}
116116
} finally {
117-
rmSync(dir, { recursive: true, force: true });
117+
// Windows:8 个 SQLite 子进程退出后 -shm/-wal 句柄延迟释放,删目录偶发 EPERM;
118+
// maxRetries 让 rm 自动重试(Node 文档:EBUSY/EPERM 等会重试),不影响并发逻辑。
119+
rmSync(dir, { recursive: true, force: true, maxRetries: 5, retryDelay: 200 });
118120
}
119121
});
120122

0 commit comments

Comments
 (0)