Skip to content

test: fix flaky test-https-agent-additional-options

Rodrigo Muino Tomonari requested to merge github/fork/Trott/add-opt into master
test: fix test-https-agent-additional-options

test-https-agent-additional-options can occasionally fail if a socket
closes before the checks near the end of the test. Modify the test to
check the freeSockets pool after each request.

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

test: refactor test-https-agent-additional-options

Move callback to location where it is less confusing.

test: favor arrow functions for anonymous callbacks

In test-https-agent-additional-options, use arrow functions for
anonymous callbacks. Replace a use of `this` with the relevant constant.

test: replace flag with option

test-https-agent-additional-options is invoked with a command-line flag.
However, there is an equivalent option that can be enabled within the
code. Do that instead.
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Merge request reports

Loading