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
It would be fair to argue this is a nodejs problem and not a jest problem. I opened it here, not just to report, but also for others to find when they run into this issue.
Version
29.7.0
Steps to reproduce
I encountered this on a cluster of CI servers, when upgrading from node v20 to v22.12.0.
The server has a 32 core cpu
lscpu
output:What I found was that jest always used
maxWorkers: 1
. You could see this, withLooking at the coding, I recreated the problem with this script which also reported one on the machine.
In other words, the
availableParallelism
implementation seems to be overzealous for recent node versions and may not be viable to use in this context.I created a monkey-patch and this resolved the problem for me.
Expected behavior
maxWorkers should reflect the number of available CPUs, or if relative values are configured a fraction of the number of CPUs.
Actual behavior
Instead, in the described constellation, it was always one.
Additional context
No response
Environment
The text was updated successfully, but these errors were encountered: