@@ -470,10 +470,14 @@ describe('MongoClient.close() Integration', () => {
470
470
client = this . configuration . newClient ( ) ;
471
471
utilClient = this . configuration . newClient ( ) ;
472
472
await client . connect ( ) ;
473
- const collection = client . db ( 'db' ) . collection ( 'collection' ) ;
473
+ const collection = await client . db ( 'db' ) . createCollection ( 'collection' ) ;
474
+ console . log ( 'createCollection done' ) ;
474
475
session = client . startSession ( { explicit : false } ) ;
476
+ console . log ( 'startSession done' ) ;
475
477
session . startTransaction ( ) ;
478
+ console . log ( 'startTransaction done' ) ;
476
479
await collection . insertOne ( { x : 1 } , { session } ) ;
480
+ console . log ( 'insert done' ) ;
477
481
478
482
const opBefore = await utilClient . db ( ) . admin ( ) . command ( { currentOp : 1 } ) ;
479
483
idleSessionsBeforeClose = opBefore . inprog . filter ( s => s . type === 'idleSession' ) ;
@@ -532,7 +536,7 @@ describe('MongoClient.close() Integration', () => {
532
536
client = this . configuration . newClient ( ) ;
533
537
utilClient = this . configuration . newClient ( ) ;
534
538
await client . connect ( ) ;
535
- const collection = client . db ( 'db' ) . collection ( 'collection' ) ;
539
+ const collection = await client . db ( 'db' ) . createCollection ( 'collection' ) ;
536
540
session = client . startSession ( ) ;
537
541
session . startTransaction ( ) ;
538
542
await collection . insertOne ( { x : 1 } , { session } ) ;
0 commit comments