From 796998b4a1e5aa061b854c12773c0da565171618 Mon Sep 17 00:00:00 2001 From: Matt Broadstone Date: Sun, 3 Dec 2017 14:15:29 -0500 Subject: [PATCH] refactor(mongo-client): support a pool minSize option This is required for testing retryable writes with only a single connection. NODE-1105 --- lib/mongo_client.js | 3 ++- lib/topologies/replset.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/mongo_client.js b/lib/mongo_client.js index 337669ec56..09458bd668 100644 --- a/lib/mongo_client.js +++ b/lib/mongo_client.js @@ -88,7 +88,8 @@ var validOptionNames = [ 'fsync', 'readPreferenceTags', 'numberOfRetries', - 'auto_reconnect' + 'auto_reconnect', + 'minSize' ]; var ignoreOptionNames = ['native_parser']; diff --git a/lib/topologies/replset.js b/lib/topologies/replset.js index 1daff2e1d1..b6e67242c2 100644 --- a/lib/topologies/replset.js +++ b/lib/topologies/replset.js @@ -75,7 +75,8 @@ var legalOptionNames = [ 'promoteValues', 'promoteBuffers', 'maxStalenessSeconds', - 'promiseLibrary' + 'promiseLibrary', + 'minSize' ]; /**