From e5c6ded7996953b4fe146e6ce9a75041a7849509 Mon Sep 17 00:00:00 2001 From: Valeri Karpov Date: Thu, 14 Nov 2019 10:22:55 -0500 Subject: [PATCH] test(connection): fix tests re: #8337 --- lib/connection.js | 3 --- test/connection.test.js | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/connection.js b/lib/connection.js index 6cdd4e64dc5..a8e418f49a9 100644 --- a/lib/connection.js +++ b/lib/connection.js @@ -652,9 +652,6 @@ Connection.prototype.openUri = function(uri, options, callback) { server.s.pool.on('reconnect', () => { _handleReconnect(); }); - server.s.pool.on('reconnectFailed', () => { - _this.emit('reconnectFailed'); - }); server.s.pool.on('timeout', () => { _this.emit('timeout'); }); diff --git a/test/connection.test.js b/test/connection.test.js index f7c4a4e4852..16b05ac3305 100644 --- a/test/connection.test.js +++ b/test/connection.test.js @@ -260,7 +260,7 @@ describe('connections:', function() { reconnectTries: 3, reconnectInterval: 100, useNewUrlParser: true, - useUnifiedTopology: true + useUnifiedTopology: false // reconnectFailed doesn't get emitted with 'useUnifiedTopology' }); conn.on('connected', function() {