test: handle errors correctly in GC http test

In test-gc-http-client-timeout.js, res.resume is not a function if error
occurs. Remove the error handler.

PR-URL: https://github.com/nodejs/node/pull/22185
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
Ouyang Yadong 2018-08-08 10:51:16 +08:00 committed by Rich Trott
parent 3ce6bc3b50
commit 2e37d0fdc0

View File

@ -39,7 +39,7 @@ function getall() {
pathname: '/',
port: server.address().port
}, cb);
req.on('error', cb);
req.setTimeout(10, function() {
console.log('timeout (expected)');
});