mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix: resolve flaky cleanup test race condition in CI
The subdirectory removal test used setImmediate ticks to wait for async cleanup, which was insufficient on slow CI runners. Replaced with real setTimeout delays (100 x 10ms) to give async readdir/stat/rm I/O time to complete.
This commit is contained in:
@@ -34,8 +34,8 @@ function removeSetting(key: string) {
|
||||
}
|
||||
|
||||
async function waitForCleanup(): Promise<void> {
|
||||
for (let i = 0; i < 50; i++) {
|
||||
await new Promise((resolve) => setImmediate(resolve));
|
||||
for (let i = 0; i < 100; i++) {
|
||||
await new Promise((resolve) => setTimeout(resolve, 10));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user