avajs / ava

Node.js test runner that lets you develop with confidence 🚀
MIT License
20.74k stars 1.41k forks source link

RequestError: socket hang up #2617

Closed MMcKester closed 3 years ago

MMcKester commented 3 years ago

Hi,

I use ava in combination with Electron and Spectron on Windows and macOS and it works great.

So I setup a Gitlab pipeline which executes npm run ava after building. I noticed that the tests fail if a parallel process on that machine consumes between 50-80% CPU power with the following error:

  Unhandled rejection in test/test1.ts
  RequestError: socket hang up
  › ClientRequest.<anonymous> (node_modules/webdriver/node_modules/got/dist/source/core/index.js:953:111)
  › ClientRequest.origin.emit (node_modules/webdriver/node_modules/@szmarczak/http-timer/dist/source/index.js:39:20)

Is there any verbose mode to find out where this error message comes from?

Thank you!

sindresorhus commented 3 years ago

RequestError: socket hang up

This usually means you did too many requests at once.

sindresorhus commented 3 years ago

Try to reduce the concurrency: https://github.com/avajs/ava/blob/master/docs/06-configuration.md

sindresorhus commented 3 years ago

I'm going to close as this is not an issue with AVA.

MMcKester commented 3 years ago

Sorry, I thought this is an issue with AVA. My concurrency is set to 1 since the job run in serial mode