From cf598e1756c33bb055f2815ea4ebe68cf5d59a4a Mon Sep 17 00:00:00 2001 From: Matt Broadstone Date: Thu, 22 Aug 2019 07:42:37 -0400 Subject: [PATCH] fix: correct inverted defaults for unified topology The defaults for `serverSelectionTimeoutMS` and `heartbeatFrequencyMS` were unintentionally inverted. --- lib/core/sdam/topology.js | 4 ++-- test/functional/connections_stepdown_tests.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/core/sdam/topology.js b/lib/core/sdam/topology.js index c16351944b6..b58856ec0f2 100644 --- a/lib/core/sdam/topology.js +++ b/lib/core/sdam/topology.js @@ -32,8 +32,8 @@ let globalTopologyCounter = 0; // Constants const TOPOLOGY_DEFAULTS = { localThresholdMS: 15, - serverSelectionTimeoutMS: 10000, - heartbeatFrequencyMS: 30000, + serverSelectionTimeoutMS: 30000, + heartbeatFrequencyMS: 10000, minHeartbeatFrequencyMS: 500 }; diff --git a/test/functional/connections_stepdown_tests.js b/test/functional/connections_stepdown_tests.js index 9c012f761c0..fb3e2cd81c5 100644 --- a/test/functional/connections_stepdown_tests.js +++ b/test/functional/connections_stepdown_tests.js @@ -30,7 +30,7 @@ describe('Connections survive primary step down', function() { beforeEach(function() { client = this.configuration.newClient( { w: 1 }, - { poolSize: 1, retryWrites: false, useUnifiedTopology: true, serverSelectionTimeoutMS: 30000 } + { poolSize: 1, retryWrites: false, useUnifiedTopology: true } ); return client