Skip to content

Commit cdfb507

Browse files
committedOct 11, 2019
chore: add useUnifiedTopology for tests re: #8212
1 parent 936ddfb commit cdfb507

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎test/connection.test.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,10 @@ describe('connections:', function() {
188188
let numReconnected = 0;
189189
let numReconnect = 0;
190190
let numClose = 0;
191-
const conn = mongoose.createConnection('mongodb://localhost:27000/mongoosetest', { useNewUrlParser: true });
191+
const conn = mongoose.createConnection('mongodb://localhost:27000/mongoosetest', {
192+
useNewUrlParser: true,
193+
useUnifiedTopology: true
194+
});
192195

193196
conn.on('connected', function() {
194197
++numConnected;
@@ -255,7 +258,8 @@ describe('connections:', function() {
255258
const conn = mongoose.createConnection('mongodb://localhost:27000/mongoosetest', {
256259
reconnectTries: 3,
257260
reconnectInterval: 100,
258-
useNewUrlParser: true
261+
useNewUrlParser: true,
262+
useUnifiedTopology: true
259263
});
260264

261265
conn.on('connected', function() {

0 commit comments

Comments
 (0)