diff --git a/src/table.ts b/src/table.ts index 8d0f63b29..fa50f2f11 100644 --- a/src/table.ts +++ b/src/table.ts @@ -751,6 +751,7 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`); let userCanceled = false; const userStream = new PassThrough({ objectMode: true, + readableHighWaterMark: 0, transform(row, _encoding, callback) { if (userCanceled) { callback(); diff --git a/test/readrows.ts b/test/readrows.ts index 1a85feb8e..265125c34 100644 --- a/test/readrows.ts +++ b/test/readrows.ts @@ -223,7 +223,7 @@ describe('Bigtable/ReadRows', () => { }); // TODO: enable after https://github.com/googleapis/nodejs-bigtable/issues/1286 is fixed - it.skip('should be able to stop reading from the read stream when reading asynchronously', function (done) { + it('should be able to stop reading from the read stream when reading asynchronously', function (done) { if (process.platform === 'win32') { this.timeout(60000); // it runs much slower on Windows! } @@ -252,6 +252,7 @@ describe('Bigtable/ReadRows', () => { // Transform stream const transform = new Transform({ objectMode: true, + writableHighWaterMark: 0, transform: (row, _encoding, callback) => { setTimeout(() => { callback(null, row);