You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Platform: Darwin 15.2.0 Darwin Kernel Version 15.2.0: Fri Nov 13 19:56:56 PST 2015; root:xnu-3248.20.55~2/RELEASE_X86_64 x86_64
Subsystem: test, lib
While attending the code and learn in the Node Interactive at Amesterdam we we’re giving the task of cleaning up some of the unit tests to follow the latest guidelines.
In the file test/parallel/test-http-agent-destroyed-socket.js once I replaced:
response.once('close’, callback)
for
response.once('close’, common.mustCall(callback))
The unit tests started to fail with the following error message:
Mismatched <anonymous> function calls. Expected 1, actual 0.
at IncomingMessage.response.on (/Users/ricardocanastro/dev/node/test/parallel/test-http-agent-destroyed-socket.js:48:37)
Activity
addaleax commentedon Sep 17, 2016
Am I understanding you correctly that the
request1:: socket closedline in your gist doesn’t get printed?canastro commentedon Sep 18, 2016
@addaleax nop, the
'response:: close'never gets printed. I'll add this information to the main comment to make it a bit clearer.addaleax commentedon Sep 18, 2016
Yeah, I can confirm that. /cc @nodejs/http
Trott commentedon Jul 10, 2017
@nodejs/http Confirmed bug? Not a bug? Something else?
apapirovski commentedon Apr 13, 2018
Fix to the test in #20006
test: fix http-agent-destroyed-socket cb not firing
test: fix http-agent-destroyed-socket cb not firing