Skip to content

Commit 73e113f

Browse files
committed
test(workers): extend cache worker timeout on windows
1 parent 7932d4e commit 73e113f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/workers/cache-grouped-scripts-worker.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ function runWorkerMessage(messageToSend: any): Promise<{ msg: any; worker: Worke
3636
return new Promise((resolve, reject) => {
3737
const worker = new Worker(compiledWorkerPath)
3838
let resolved = false
39+
const timeoutMs = process.platform === 'win32' ? 15000 : 5000
3940

4041
// Diagnostics: log worker lifecycle to help triage CI hangs
4142
worker.on('online', () => {
@@ -75,7 +76,7 @@ function runWorkerMessage(messageToSend: any): Promise<{ msg: any; worker: Worke
7576
try { worker.terminate() } catch {}
7677
reject(new Error('Timeout waiting for CACHE_MAIN_SCRIPTS message'))
7778
}
78-
}, 5000)
79+
}, timeoutMs)
7980
})
8081
}
8182

0 commit comments

Comments
 (0)