codeceptjs 4.0.2-beta.14 → 4.0.2-beta.15

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.
@@ -163,6 +163,13 @@ initPromise = (async function () {
163
163
  const optsWithChild = { ...options, child: workerIndex }
164
164
  codecept = new Codecept(config, optsWithChild)
165
165
 
166
+ // Add staggered delay to prevent resource conflicts (e.g., browser port conflicts)
167
+ const delay = (workerIndex - 1) * 500 // 0ms, 500ms, 1000ms, etc.
168
+ if (delay > 0) {
169
+ console.log(`[Worker ${workerIndex}] Waiting ${delay}ms to stagger initialization...`)
170
+ await new Promise(resolve => setTimeout(resolve, delay))
171
+ }
172
+
166
173
  console.log(`[Worker ${workerIndex}] Initializing Codecept...`)
167
174
  try {
168
175
  await codecept.init(testRoot)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeceptjs",
3
- "version": "4.0.2-beta.14",
3
+ "version": "4.0.2-beta.15",
4
4
  "type": "module",
5
5
  "description": "Supercharged End 2 End Testing Framework for NodeJS",
6
6
  "keywords": [