summaryrefslogtreecommitdiff
path: root/test/disabled
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2011-03-02 21:21:08 -0800
committerRyan Dahl <ry@tinyclouds.org>2011-03-02 21:21:29 -0800
commitca8be39b9ee22b583c844e5cad6030c438f0f4e0 (patch)
treeef0407c50d1376e5357f818ff31ffca7e1ab7dc6 /test/disabled
parentb3884c574b3607cbdea9c9998dee2dc26e8a0dd1 (diff)
downloadandroid-node-v8-ca8be39b9ee22b583c844e5cad6030c438f0f4e0.tar.gz
android-node-v8-ca8be39b9ee22b583c844e5cad6030c438f0f4e0.tar.bz2
android-node-v8-ca8be39b9ee22b583c844e5cad6030c438f0f4e0.zip
Disable test-http-agent2.js for the moment
Still broken.
Diffstat (limited to 'test/disabled')
-rw-r--r--test/disabled/test-http-agent2.js63
1 files changed, 63 insertions, 0 deletions
diff --git a/test/disabled/test-http-agent2.js b/test/disabled/test-http-agent2.js
new file mode 100644
index 0000000000..eed1cb90d0
--- /dev/null
+++ b/test/disabled/test-http-agent2.js
@@ -0,0 +1,63 @@
+var common = require('../common');
+var assert = require('assert');
+var http = require('http');
+
+var reqEndCount = 0;
+
+var server = http.Server(function(req, res) {
+ res.writeHead(200);
+ res.end("hello world\n");
+
+ var buffer = '';
+
+ req.setEncoding('utf8');
+
+ req.on('data', function(s) {
+ buffer += s;
+ });
+
+ req.on('end', function() {
+ reqEndCount++;
+ assert.equal(body, buffer);
+ });
+});
+
+var responses = 0;
+var N = 10;
+var M = 10;
+
+var body = ''
+for (var i = 0; i < 1000; i++) {
+ body += 'hello world';
+}
+
+var options = {
+ port: common.PORT,
+ path: '/',
+ method: 'PUT'
+};
+
+server.listen(common.PORT, function() {
+ for (var i = 0; i < N; i++) {
+ setTimeout(function () {
+ for (var j = 0; j < M; j++) {
+
+ var req = http.request(options, function(res) {
+ console.log(res.statusCode);
+ if (++responses == N * M) server.close();
+ }).on('error', function(e) {
+ console.log(e.message);
+ process.exit(1);
+ });
+
+ req.end(body);
+ }
+ }, i);
+ }
+});
+
+
+process.on('exit', function() {
+ assert.equal(N * M, responses);
+ assert.equal(N * M, reqEndCount);
+});