test: improve http test reliability
Fake the socket handle to ensure an immediate error is returned uniformly across all platforms.
CI: https://ci.nodejs.org/job/node-test-pull-request/8670/
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
- test
- http