Skip to content

Commit

Permalink
chore: add useUnifiedTopology for tests re: #8212
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Oct 11, 2019
1 parent 936ddfb commit cdfb507
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/connection.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ describe('connections:', function() {
let numReconnected = 0;
let numReconnect = 0;
let numClose = 0;
const conn = mongoose.createConnection('mongodb://localhost:27000/mongoosetest', { useNewUrlParser: true });
const conn = mongoose.createConnection('mongodb://localhost:27000/mongoosetest', {
useNewUrlParser: true,
useUnifiedTopology: true
});

conn.on('connected', function() {
++numConnected;
Expand Down Expand Up @@ -255,7 +258,8 @@ describe('connections:', function() {
const conn = mongoose.createConnection('mongodb://localhost:27000/mongoosetest', {
reconnectTries: 3,
reconnectInterval: 100,
useNewUrlParser: true
useNewUrlParser: true,
useUnifiedTopology: true
});

conn.on('connected', function() {
Expand Down

0 comments on commit cdfb507

Please sign in to comment.