Add artificial timeout to broken test-https-large-response

pull/22966/head
Ryan Dahl 2011-01-31 10:44:08 -08:00
parent 6ede26cb9c
commit ef123600ce
1 changed files with 6 additions and 0 deletions

View File

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