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:
parent
fa3bfc3a66
commit
879efb3338
@ -41,7 +41,7 @@ var options = {
|
|||||||
var server = http.createServer(function(req, res) {
|
var server = http.createServer(function(req, res) {
|
||||||
res.writeHead(200, {'Content-Length':'2'});
|
res.writeHead(200, {'Content-Length':'2'});
|
||||||
res.write('*');
|
res.write('*');
|
||||||
setTimeout(function() { res.end('*') }, 20);
|
setTimeout(function() { res.end('*') }, 100);
|
||||||
});
|
});
|
||||||
|
|
||||||
server.listen(options.port, options.host, function() {
|
server.listen(options.port, options.host, function() {
|
||||||
@ -49,7 +49,7 @@ server.listen(options.port, options.host, function() {
|
|||||||
req.end();
|
req.end();
|
||||||
|
|
||||||
function onresponse(res) {
|
function onresponse(res) {
|
||||||
req.setTimeout(10, function() {
|
req.setTimeout(50, function() {
|
||||||
assert.equal(nchunks, 1); // should have received the first chunk by now
|
assert.equal(nchunks, 1); // should have received the first chunk by now
|
||||||
ntimeouts++;
|
ntimeouts++;
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user