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

Function test

test/integration/sessions/sessions.test.ts:296–308  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

294 {
295 metadata: { requires: { mongodb: '>= 3.6.0', topology: ['replicaset'] } },
296 async test() {
297 // advance cluster time to a new valid value
298 testSession.advanceClusterTime(otherSession.clusterTime);
299 expect(testSession.clusterTime).to.deep.equal(otherSession.clusterTime);
300
301 // check control session
302 expect(controlSession.clusterTime).to.not.deep.equal(testSession.clusterTime);
303
304 // check that the session still works
305 expect(await collection.findOne({}, { session: testSession }))
306 .property('apple')
307 .to.equal('green');
308 }
309 }
310 );
311

Callers

nothing calls this directly

Calls 5

advanceClusterTimeMethod · 0.80
findOneMethod · 0.80
failMethod · 0.80
endSessionMethod · 0.80
startSessionMethod · 0.80

Tested by

no test coverage detected