From cdfb507be166e6f047b2a621403e63d93a58d418 Mon Sep 17 00:00:00 2001 From: Valeri Karpov Date: Fri, 11 Oct 2019 12:44:43 -0400 Subject: [PATCH] chore: add useUnifiedTopology for tests re: #8212 --- test/connection.test.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/connection.test.js b/test/connection.test.js index bddc59ec5f1..89056d5524b 100644 --- a/test/connection.test.js +++ b/test/connection.test.js @@ -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; @@ -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() {