Browse Source

test: pummel/test-net-throttle adhere to streams

bufferSize is now a getter that shows all that has not been
acknowledged by the os, as well as in the buffer state. The test is
only looking to verify the js verified state.
v0.11.12-release
Timothy J Fontaine 11 years ago
parent
commit
95bb347d6c
  1. 4
      test/pummel/test-net-throttle.js

4
test/pummel/test-net-throttle.js

@ -43,8 +43,8 @@ var server = net.createServer(function(connection) {
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);
console.log('bufferSize: ' + connection.bufferSize, 'expecting', N);
assert.ok(0 <= connection.bufferSize && connection._writableState.length <= N);
connection.end();
});

Loading…
Cancel
Save