File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
test/integration/node-specific Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import {
18
18
ServerDescription ,
19
19
Topology
20
20
} from '../../mongodb' ;
21
- import { clearFailPoint , configureFailPoint , runLater } from '../../tools/utils' ;
21
+ import { clearFailPoint , configureFailPoint } from '../../tools/utils' ;
22
22
import { setupDatabase } from '../shared' ;
23
23
24
24
describe ( 'class MongoClient' , function ( ) {
@@ -603,10 +603,12 @@ describe('class MongoClient', function () {
603
603
'does not checkout connection when authentication is disabled' ,
604
604
{ requires : { auth : 'disabled' } } ,
605
605
async function ( ) {
606
- const checkoutStarted = once ( client , 'connectionCheckOutStarted' ) ;
606
+ const checkoutStartedEvents = [ ] ;
607
+ client . on ( 'connectionCheckOutStarted' , event => {
608
+ checkoutStartedEvents . push ( event ) ;
609
+ } ) ;
607
610
await client . connect ( ) ;
608
- const checkout = await checkoutStarted ;
609
- expect ( checkout ) . to . not . exist ;
611
+ expect ( checkoutStartedEvents ) . to . be . empty ;
610
612
expect ( client ) . to . have . property ( 'topology' ) . that . is . instanceOf ( Topology ) ;
611
613
}
612
614
) ;
You can’t perform that action at this time.
0 commit comments