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

Method cleanup

test/tools/unified-spec-runner/entities.ts:579–604  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

577 }
578
579 async cleanup(): Promise<void> {
580 await this.failPoints.disableFailPoints();
581
582 trace('closeCursors');
583 for (const [, cursor] of this.mapOf('cursor')) {
584 await cursor.close();
585 }
586
587 trace('closeStreams');
588 for (const [, stream] of this.mapOf('stream')) {
589 await stream.close();
590 }
591
592 trace('endSessions');
593 for (const [, session] of this.mapOf('session')) {
594 await session.endSession({ force: true });
595 }
596
597 trace('closeClient');
598 for (const [, client] of this.mapOf('client')) {
599 await client.close();
600 }
601
602 trace('clear');
603 this.clear();
604 }
605
606 static async createEntities(
607 config: TestConfiguration,

Callers 1

runUnifiedTestFunction · 0.45

Calls 6

mapOfMethod · 0.95
traceFunction · 0.90
disableFailPointsMethod · 0.80
endSessionMethod · 0.80
closeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected