You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@jkretsch I looked into the issue, and it seems the problem is coming from how argv is handled in the WorkerTask class located in lib/runner/concurrency/worker-task.js.
The WorkerTask class uses Piscina to run tasks in parallel across worker threads, specifically with this line: this.piscina.run({ argv: this.argv, port1 }, { transferList: [port1] })
Here, Piscina is running the worker thread, which manages the task execution in parallel. The issue with missing arguments is happening because Piscina seems to modify or filter out some of the passed arguments (argv) when sending them to the worker thread.
You can check the Piscina library in dist/worker.js. Below is the explanation of how argv might be handled in this file: 1. Worker Initialization
argv is passed to workers, but Piscina might sanitize unnecessary data.
2. Inside getHandler Function
Piscina’s getHandler may filter out argv if it’s not needed for the task.
const handler = await getHandler(filename, name);
let result = await handler(task); // argv might be ignored here
3. Task Processing
When processing the task, Piscina may discard argv if it’s unnecessary. let result = await handler(task); // argv could be stripped if not needed
Seems the root cause has been found. Thanks @ac-mmi. Question now is how/when will this be fixed? This is impacting our ability to run large test sets in parallel.
Description of the bug/issue
When I run tests in parallel in Nightwatch v3, process.argv is getting clobbered. Here's process.argv in Nightwatch v2 ...
and here's process.argv in Nightwatch v3 ...
You can see that the command line options I supplied (--include-tag, --env, --test) are being removed when I run in Nightwatch v3.
Steps to reproduce
Sample test
Command to run
Verbose Output
Nightwatch Configuration
Nightwatch.js Version
3.11
Node Version
18.20.5
Browser
No response
Operating System
Windows 10
Additional Information
No response
The text was updated successfully, but these errors were encountered: