Add artificial timeout to broken test-https-large-response
This commit is contained in:
parent
6ede26cb9c
commit
ef123600ce
@ -28,6 +28,10 @@ var server = https.createServer(options, function (req, res) {
|
||||
var count = 0;
|
||||
var gotResEnd = false;
|
||||
|
||||
var timeout = setTimeout(function() {
|
||||
process.exit(1);
|
||||
}, 10*1000);
|
||||
|
||||
server.listen(common.PORT, function () {
|
||||
https.get({ port: common.PORT }, function(res) {
|
||||
console.log("response!");
|
||||
@ -47,6 +51,8 @@ server.listen(common.PORT, function () {
|
||||
console.log(" got: ", count);
|
||||
server.close();
|
||||
gotResEnd = true;
|
||||
|
||||
clearTimeout(timeout);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user