Browse Source

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.
v0.9.6-release
Ben Noordhuis 12 years ago
parent
commit
879efb3338
  1. 4
      test/simple/test-http-client-timeout-with-data.js

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

Loading…
Cancel
Save