diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-02-03 12:17:26 -0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-02-03 12:20:19 -0800 |
commit | 97f7c0645118ffb3844fec67345ad0ae7e71f6a9 (patch) | |
tree | 65d6e83c4c5bf600758572f6e84144c93d195bdb /test/simple/test-tls-throttle.js | |
parent | 3e58696c07161ef84c6b12aeb7e03d271563dcb9 (diff) | |
download | node-new-97f7c0645118ffb3844fec67345ad0ae7e71f6a9.tar.gz |
TLS: fix throttling
Re-enable test-https-large-response.js
Closes GH-614.
Diffstat (limited to 'test/simple/test-tls-throttle.js')
-rw-r--r-- | test/simple/test-tls-throttle.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/test/simple/test-tls-throttle.js b/test/simple/test-tls-throttle.js index 8d009ec966..ff0e5c35aa 100644 --- a/test/simple/test-tls-throttle.js +++ b/test/simple/test-tls-throttle.js @@ -34,6 +34,7 @@ server.listen(common.PORT, function() { var client = tls.connect(common.PORT); client.on('data', function(d) { + process.stdout.write('.'); recvCount += d.length; client.pause(); @@ -44,18 +45,24 @@ server.listen(common.PORT, function() { client.on('close', function() { + console.error('close'); server.close(); clearTimeout(timeout); }); }); -var timeout = setTimeout(function() { - process.exit(1); -}, 10*1000); +function displayCounts() { + console.log('body.length: %d', body.length); + console.log(' recvCount: %d', recvCount); +} + + +var timeout = setTimeout(displayCounts, 10*1000); process.on('exit', function() { + displayCounts(); assert.equal(1, connections); assert.equal(body.length, recvCount); }); |