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.
This commit is contained in:
Ben Noordhuis 2013-01-07 16:00:10 +01:00
parent fa3bfc3a66
commit 879efb3338

View File

@ -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++;
});