From 879efb3338c7be1925c26c7e2debfbf29ffda899 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 7 Jan 2013 16:00:10 +0100 Subject: [PATCH] test: fix simple/test-http-client-timeout-with-data The test was failing in debug mode because the timeouts were set too low. Fix that by increasing the timeouts. Admittedly not a great fix. If this test keeps playing up, it's probably best to remove it. Fixes #4528. --- test/simple/test-http-client-timeout-with-data.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/simple/test-http-client-timeout-with-data.js b/test/simple/test-http-client-timeout-with-data.js index d169065bd7b..4e1aae6ff86 100644 --- a/test/simple/test-http-client-timeout-with-data.js +++ b/test/simple/test-http-client-timeout-with-data.js @@ -41,7 +41,7 @@ var options = { var server = http.createServer(function(req, res) { res.writeHead(200, {'Content-Length':'2'}); res.write('*'); - setTimeout(function() { res.end('*') }, 20); + setTimeout(function() { res.end('*') }, 100); }); server.listen(options.port, options.host, function() { @@ -49,7 +49,7 @@ server.listen(options.port, options.host, function() { req.end(); function onresponse(res) { - req.setTimeout(10, function() { + req.setTimeout(50, function() { assert.equal(nchunks, 1); // should have received the first chunk by now ntimeouts++; });