Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

Commit a1717ff

Browse files
fix: Tests will now verify asynchronous termination of underlying steam, and fix related bug. (#1772)
* fix: Tests with termination of underlying steam * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 282ac8a commit a1717ff

6 files changed

Lines changed: 140 additions & 70 deletions

File tree

dev/src/reference.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2285,7 +2285,9 @@ export class Query<T = firestore.DocumentData> implements firestore.Query<T> {
22852285
if (proto.done) {
22862286
logger('Query._stream', tag, 'Trigger Logical Termination.');
22872287
backendStream.unpipe(stream);
2288-
stream.emit('end');
2288+
backendStream.resume();
2289+
backendStream.end();
2290+
stream.end();
22892291
}
22902292
} else {
22912293
callback(undefined, {readTime});

dev/test/bulk-writer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ describe('BulkWriter', () => {
188188
});
189189
}
190190

191-
afterEach(() => {
192-
verifyInstance(firestore);
191+
afterEach(async () => {
192+
await verifyInstance(firestore);
193193
setTimeoutHandler(setTimeout);
194194
});
195195

dev/test/partition-query.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ describe('Partition Query', () => {
8686
});
8787
});
8888

89-
afterEach(() => {
90-
verifyInstance(firestore);
89+
afterEach(async () => {
90+
await verifyInstance(firestore);
9191
setTimeoutHandler(setTimeout);
9292
});
9393

0 commit comments

Comments
 (0)