Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
fix pummel/test-net-throttle on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Zinkovsky committed Nov 1, 2011
1 parent fc61134 commit cc92234
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/pummel/test-net-throttle.js
Expand Up @@ -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;

Expand All @@ -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);
Expand Down

0 comments on commit cc92234

Please sign in to comment.