summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOuyang Yadong <oyydoibh@gmail.com>2018-08-08 10:51:16 +0800
committerRich Trott <rtrott@gmail.com>2018-08-10 14:30:55 -0700
commit2e37d0fdc0ad4a23034b7a2793c766bbcc416de2 (patch)
tree014e8cff0f9fdff6ab836cbfb13ccd44ecf04006 /test
parent3ce6bc3b5082478dfe6832997640c93de97705be (diff)
downloadandroid-node-v8-2e37d0fdc0ad4a23034b7a2793c766bbcc416de2.tar.gz
android-node-v8-2e37d0fdc0ad4a23034b7a2793c766bbcc416de2.tar.bz2
android-node-v8-2e37d0fdc0ad4a23034b7a2793c766bbcc416de2.zip
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>
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-gc-http-client-timeout.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/parallel/test-gc-http-client-timeout.js b/test/parallel/test-gc-http-client-timeout.js
index e6878021ef..e5cb91c06f 100644
--- a/test/parallel/test-gc-http-client-timeout.js
+++ b/test/parallel/test-gc-http-client-timeout.js
@@ -39,7 +39,7 @@ function getall() {
pathname: '/',
port: server.address().port
}, cb);
- req.on('error', cb);
+
req.setTimeout(10, function() {
console.log('timeout (expected)');
});