You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running a simple Deno test of writing to a document in a Firestore collection. The test passes, but Deno detects leaks:
error: Leaks detected:
- "http2Client" was created during the test, but not cleaned up during the test. Close the resource before the end of the test.
- "http2ClientConnection" was created during the test, but not cleaned up during the test. Close the resource before the end of the test.
- 2 intervals were started in this test, but never completed. This is often caused by not calling `clearInterval`.
- 2 timers were started in this test, but never completed. This is often caused by not calling `clearTimeout`.
- An async call to op_http2_poll_client_connection was started in this test, but never completed.
Steps to reproduce:
deno test --allow-all leaks-bug.ts
leaks-bug.ts
import{initializeApp,cert,deleteApp}from'firebase-admin/app';import{getFirestore}from'firebase-admin/firestore';import{assertExists}from'@std/assert';Deno.test('test',async()=>{// Initialize Cloud Firestore per https://firebase.google.com/docs/firestore/quickstart#initialize -> Node.js -> Initialize on your own serverconstapp=initializeApp({credential: cert('service-account-key.json')});constdb=getFirestore(app);constdoc=awaitdb.collection('test').doc('test').set({foo: 42});assertExists(doc);// passesawaitdeleteApp(app);// doesn't helpawaitnewPromise(resolve=>setTimeout(resolve,10*1000));// doesn't help});
The text was updated successfully, but these errors were encountered:
Describe your environment
Describe the problem
I'm running a simple Deno test of writing to a document in a Firestore collection. The test passes, but Deno detects leaks:
Steps to reproduce:
deno test --allow-all leaks-bug.ts
leaks-bug.ts
The text was updated successfully, but these errors were encountered: