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

Function makeOldSession

test/unit/sessions.test.ts:540–544  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

538
539 describe('release()', () => {
540 const makeOldSession = () => {
541 const oldSession = new ServerSession();
542 oldSession.lastUse = processTimeMS() - 30 * 60 * 1000; // add 30min
543 return oldSession;
544 };
545
546 it('should remove old sessions if they are at the start of the pool', () => {
547 const pool = new ServerSessionPool(client);

Callers 1

sessions.test.tsFile · 0.85

Calls 1

processTimeMSFunction · 0.85

Tested by

no test coverage detected