File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,9 +70,11 @@ MongooseDB.prototype.connect = function(db) {
7070 dbPass = configuration . getConfig ( 'dbPass' ) ;
7171 dbReplicaset = configuration . getConfig ( 'dbReplicaset' ) ;
7272 dbConnectionUri = configuration . getConfig ( 'dbConnectionUri' ) ;
73- options = configuration . getConfig ( 'dbOptions' ) || { } ;
74- options . domainsEnabled = true ;
75- options . useNewUrlParser = true ;
73+ options = { ...configuration . getConfig ( 'dbOptions' ) , ...{
74+ domainsEnabled : true ,
75+ useNewUrlParser : true ,
76+ useUnifiedTopology : true
77+ } } ;
7678
7779 // Construct the authentication part of the connection string.
7880 authenticationString = dbUser && dbPass ? dbUser + ':' + dbPass + '@' : '' ;
Original file line number Diff line number Diff line change @@ -112,7 +112,8 @@ function removeTestData(done) {
112112 var connStr = 'mongodb://' + testConfig . dbHost + ':' + testConfig . dbPort + '/' + testConfig . dbName ;
113113 MongoClient . connect ( connStr , {
114114 domainsEnabled : true ,
115- useNewUrlParser : true
115+ useNewUrlParser : true ,
116+ useUnifiedTopology : true
116117 } , function ( error , client ) {
117118 if ( error ) return cb ( error ) ;
118119
You can’t perform that action at this time.
0 commit comments