From cc9223406837e7610b5f36b16b6a0e51861370cb Mon Sep 17 00:00:00 2001 From: Igor Zinkovsky Date: Tue, 1 Nov 2011 16:30:42 -0700 Subject: [PATCH] fix pummel/test-net-throttle on windows --- test/pummel/test-net-throttle.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/pummel/test-net-throttle.js b/test/pummel/test-net-throttle.js index 923ba2d139..9c49d83ef1 100644 --- a/test/pummel/test-net-throttle.js +++ b/test/pummel/test-net-throttle.js @@ -27,6 +27,7 @@ var assert = require('assert'); var net = require('net'); var N = 160 * 1024; +var part_N = N / 3; var chars_recved = 0; var npauses = 0; @@ -40,7 +41,9 @@ console.log('start server on port ' + common.PORT); var server = net.createServer(function(connection) { connection.on('connect', function() { - assert.equal(false, connection.write(body)); + connection.write(body.slice(0, part_N)); + connection.write(body.slice(part_N, 2 * part_N)); + assert.equal(false, connection.write(body.slice(2 * part_N, N))); console.log('bufferSize: ' + connection.bufferSize); assert.ok(0 <= connection.bufferSize && connection.bufferSize <= N);