Skip to content

test: deflake gc-http-client tests by restricting number of requests per cpu

test-gc-http-client-* tests are failing on some systems due to too many concurrent connections being created, as the number of requests called per test is non-deterministic.

This change limits the number of calls of getAll() (the function responsible for creating the request) to 36 per CPU.

I chose this number arbitrarily as it completed the full set of requests on my machine, without any errors - perhaps there might be a better number for this setting (or a better approach entirely...). I also didn't want to change the semantics of the test by restricting to an absolute number of requests.

It's my first PR on this project, so please let me know if I'm way off the mark!

Fixes: https://github.com/nodejs/node/issues/43638

Merge request reports

Loading