Skip to content

Commit

Permalink
fix: correct inverted defaults for unified topology
Browse files Browse the repository at this point in the history
The defaults for `serverSelectionTimeoutMS` and
`heartbeatFrequencyMS` were unintentionally inverted.
  • Loading branch information
mbroadst committed Aug 22, 2019
1 parent 5188bda commit cf598e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/core/sdam/topology.js
Expand Up @@ -32,8 +32,8 @@ let globalTopologyCounter = 0;
// Constants
const TOPOLOGY_DEFAULTS = {
localThresholdMS: 15,
serverSelectionTimeoutMS: 10000,
heartbeatFrequencyMS: 30000,
serverSelectionTimeoutMS: 30000,
heartbeatFrequencyMS: 10000,
minHeartbeatFrequencyMS: 500
};

Expand Down
2 changes: 1 addition & 1 deletion test/functional/connections_stepdown_tests.js
Expand Up @@ -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
Expand Down

0 comments on commit cf598e1

Please sign in to comment.