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.
This commit is contained in:
Timothy J Fontaine committed 2014-02-24 16:55:35 -08:00
1 parent 3a3b7488b5
commit 95bb347d6c
1 file changed
+2 -2
+2 -2
View File
@@ -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();
});