Skip to content

Commit

Permalink
fix the same issue in read
Browse files Browse the repository at this point in the history
  • Loading branch information
mutianf committed Jan 12, 2022
1 parent 2fc0887 commit a297a78
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 1 addition & 2 deletions src/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -905,8 +905,6 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`);

activeRequestStream = requestStream!;

requestStream!.on('request', () => numRequestsMade++);

const toRowStream = new Transform({
transform: (rowData, _, next) => {
if (
Expand Down Expand Up @@ -945,6 +943,7 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`);
}
});
rowStream.pipe(userStream);
numRequestsMade++;
};

makeNewRequest();
Expand Down
3 changes: 0 additions & 3 deletions test/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,6 @@ describe('Bigtable/Table', () => {
(stream as any).abort = () => {};

setImmediate(() => {
stream.emit('request');
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(emitters!.shift() as any)(stream);
});
Expand Down Expand Up @@ -2372,7 +2371,6 @@ describe('Bigtable/Table', () => {
});

setImmediate(() => {
stream.emit('request');
stream.emit('error', error);
});

Expand Down Expand Up @@ -2525,7 +2523,6 @@ describe('Bigtable/Table', () => {
});

setImmediate(() => {
stream.emit('request');
stream.end({entries: fakeStatuses.shift()});
});

Expand Down

0 comments on commit a297a78

Please sign in to comment.