Your test tools are smart and that’s a problem. Learn about when optimization goes wrong.

 

In the CircleCI cloud, your job may be running in various kinds of environments. Some of those environments could have lots of resources available but your jobs running in them only have access to a small slice of those available resources.

For instance, using the docker executor will often have your job running in a VM with thirty-two CPU cores available. This causes problems with testing tools like jest which by default will spawn workers based on the number of available CPU cores. It will think it has access to thirty-two cores, but in reality, it only has access to two. This is a recipe for sadness. Be aware of how your tools configure themselves according to their enviroment and be aware of what the environment is reporting to your tools. 

In the case of jest you can tell it to limit the number of workers with the --maxWorkers= command line option.

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.