Skip to content

Commit

Permalink
test: Fix deadline exceeded error in readstream test (googleapis#1336)
Browse files Browse the repository at this point in the history
* Remove workaround

Remove workaround for the call to createreadstream because the issue mentioned in the comment is closed.

* Remove workaround for read stream test

This PR removes the workaround for the read stream test. This may allow the tests for windows to function without being flakey.

* Increase the test timeout
  • Loading branch information
danieljbruce authored Oct 2, 2023
1 parent e14992b commit bc53632
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions test/readrows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,7 @@ describe('Bigtable/ReadRows', () => {
let receivedRowCount = 0;
let lastKeyReceived: number | undefined;

const readStream = table.createReadStream({
// workaround for https://github.com/grpc/grpc-node/issues/2446, remove when fixed
gaxOptions: {
timeout: 3000,
},
});
const readStream = table.createReadStream();
readStream.on('error', (err: GoogleError) => {
done(err);
});
Expand Down Expand Up @@ -225,7 +220,7 @@ describe('Bigtable/ReadRows', () => {
// TODO: enable after https://github.com/googleapis/nodejs-bigtable/issues/1286 is fixed
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!
this.timeout(600000); // it runs much slower on Windows!
}

// 1000 rows must be enough to reproduce issues with losing the data and to create backpressure
Expand All @@ -242,12 +237,7 @@ describe('Bigtable/ReadRows', () => {
let lastKeyReceived: number | undefined;

// BigTable stream
const readStream = table.createReadStream({
// workaround for https://github.com/grpc/grpc-node/issues/2446, remove when fixed
gaxOptions: {
timeout: 3000,
},
});
const readStream = table.createReadStream();

// Transform stream
const transform = new Transform({
Expand Down

0 comments on commit bc53632

Please sign in to comment.