From 6498d80606df7bbcf77631c719e40c22d2a7e2eb Mon Sep 17 00:00:00 2001 From: Ouyang Yadong Date: Wed, 8 Aug 2018 10:51:16 +0800 Subject: [PATCH] test: handle errors correctly in test-gc-http-client-timeout.js --- test/parallel/test-gc-http-client-timeout.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-gc-http-client-timeout.js b/test/parallel/test-gc-http-client-timeout.js index e6878021ef9b89..e5cb91c06f8911 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)'); });