summaryrefslogtreecommitdiff
path: root/test/simple/test-tls-throttle.js
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2011-02-03 12:17:26 -0800
committerRyan Dahl <ry@tinyclouds.org>2011-02-03 12:20:19 -0800
commit97f7c0645118ffb3844fec67345ad0ae7e71f6a9 (patch)
tree65d6e83c4c5bf600758572f6e84144c93d195bdb /test/simple/test-tls-throttle.js
parent3e58696c07161ef84c6b12aeb7e03d271563dcb9 (diff)
downloadnode-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.js13
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);
});