MCPcopy
hub / github.com/mongodb/node-mongodb-native / tearDown

Method tearDown

test/tools/cmap_spec_runner.ts:352–363  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

350 }
351
352 async tearDown() {
353 if (this.pool) {
354 this.closePool();
355 }
356 const connectionsToDestroy = Array.from(this.orphans).concat(
357 Array.from(this.connections.values())
358 );
359 for (const conn of connectionsToDestroy) {
360 conn.destroy();
361 }
362 this.poolEventsEventEmitter.removeAllListeners();
363 }
364}
365
366async function runCmapTest(test: CmapTest, threadContext: ThreadContext) {

Callers 1

runCmapTestSuiteFunction · 0.80

Calls 3

closePoolMethod · 0.95
removeAllListenersMethod · 0.80
destroyMethod · 0.45

Tested by

no test coverage detected