kinesis-write-stream
Advanced tools
Comparing version 0.0.1 to 1.0.0
@@ -135,4 +135,9 @@ 'use strict'; | ||
* @param {Function} callback | ||
* @return {undefined} | ||
*/ | ||
KinesisWritable.prototype._flush = function _flush(callback) { | ||
if (this.queue.length === 0) { | ||
return callback(); | ||
} | ||
var retry = retryFn.bind(null, { | ||
@@ -139,0 +144,0 @@ retries: this.maxRetries, |
{ | ||
"name": "kinesis-write-stream", | ||
"version": "0.0.1", | ||
"version": "1.0.0", | ||
"description": "Kinesis writable stream that buffers up records", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -13,3 +13,3 @@ # kinesis-write-stream | ||
Records written to the stream will buffer up until `highWaterMark` has | ||
been reached or the stream is closed before writing to Kinesis using | ||
been reached, or the stream is closed, before writing to Kinesis using | ||
`putRecords`. | ||
@@ -16,0 +16,0 @@ |
@@ -89,2 +89,18 @@ 'use strict'; | ||
it('should do nothing if there is nothing in the queue when the stream is closed', function(done) { | ||
this.client.putRecords.yields(null, successResponseFixture); | ||
this.stream.on('finish', function() { | ||
expect(this.client.putRecords).to.have.been.calledOnce; | ||
done(); | ||
}.bind(this)); | ||
for (var i = 0; i < 6; i++) { | ||
this.stream.write(recordsFixture); | ||
} | ||
this.stream.end(); | ||
}); | ||
it('should buffer records up to highWaterMark', function(done) { | ||
@@ -91,0 +107,0 @@ this.client.putRecords.yields(null, successResponseFixture); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
16560
17
308
0