codeceptjs 4.0.2-beta.14 → 4.0.2-beta.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -119,6 +119,13 @@ let config
|
|
|
119
119
|
// Load test and run
|
|
120
120
|
initPromise = (async function () {
|
|
121
121
|
try {
|
|
122
|
+
// Add staggered delay at the very start to prevent resource conflicts
|
|
123
|
+
const delay = (workerIndex - 1) * 500 // 0ms, 500ms, 1000ms, etc.
|
|
124
|
+
if (delay > 0) {
|
|
125
|
+
console.log(`[Worker ${workerIndex}] Waiting ${delay}ms to stagger initialization...`)
|
|
126
|
+
await new Promise(resolve => setTimeout(resolve, delay))
|
|
127
|
+
}
|
|
128
|
+
|
|
122
129
|
console.log(`[Worker ${workerIndex}] Starting initialization...`)
|
|
123
130
|
|
|
124
131
|
// Import modules dynamically to avoid ES Module loader race conditions in Node 22.x
|