File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -470,7 +470,8 @@ describe('Topology (unit)', function () {
470
470
// occurs `requestCheck` will be called for an immediate check.
471
471
expect ( requestCheck ) . property ( 'callCount' ) . to . equal ( 1 ) ;
472
472
473
- topology . close ( { } , done ) ;
473
+ topology . close ( ) ;
474
+ done ( ) ;
474
475
} ) ;
475
476
} ) ;
476
477
} ) ;
@@ -483,11 +484,12 @@ describe('Topology (unit)', function () {
483
484
} ) ;
484
485
485
486
topology . close ( ) ;
486
- topology . selectServer ( ReadPreference . primary , { serverSelectionTimeoutMS : 2000 } , err => {
487
- expect ( err ) . to . exist ;
488
- expect ( err ) . to . match ( / T o p o l o g y i s c l o s e d / ) ;
489
- done ( ) ;
490
- } ) ;
487
+ topology
488
+ . selectServer ( ReadPreference . primary , { serverSelectionTimeoutMS : 2000 } )
489
+ . then ( expect . fail , err => {
490
+ expect ( err ) . to . match ( / T o p o l o g y i s c l o s e d / ) ;
491
+ done ( ) ;
492
+ } ) ;
491
493
} ) ;
492
494
493
495
describe ( 'waitQueue' , function ( ) {
You can’t perform that action at this time.
0 commit comments