Commit Graph

2 Commits

Author SHA1 Message Date
Brian White
fcd82e7601
test: improve http test reliability
Fake the socket handle to ensure an immediate error is returned
uniformly across all platforms.

PR-URL: https://github.com/nodejs/node/pull/13693
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-17 10:43:57 -04:00
Evan Lucas
2cf4882136 test: add regression test for immediate socket errors
This test ensures that a http client request with the default agent
that has a socket that is immediately destroyed can still be caught by
adding an error event listener to the request object.

PR-URL: https://github.com/nodejs/node/pull/12854
Fixes: https://github.com/nodejs/node/issues/12841
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-05-23 13:20:03 -05:00