Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-3194

Allow passing undefined to options to MongoClient constructor in 4.0

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.0
    • Affects Version/s: 4.0.0
    • Component/s: None
    • None
    • Not Needed

      I tried passing maxPoolSize: undefined into the MongoClient constructor, and ended up with the following error:

      TypeError: Expected maxPoolSize to be stringified int value, got: undefined
          at getInt (/home/mbroadst/Development/mongo/node-mongodb-native/lib/connection_string.js:188:11)
          at getUint (/home/mbroadst/Development/mongo/node-mongodb-native/lib/connection_string.js:191:25)
          at setOption (/home/mbroadst/Development/mongo/node-mongodb-native/lib/connection_string.js:382:34)
          at Object.parseOptions (/home/mbroadst/Development/mongo/node-mongodb-native/lib/connection_string.js:313:9)
          at new MongoClient (/home/mbroadst/Development/mongo/node-mongodb-native/lib/mongo_client.js:61:46)
          at main (/home/mbroadst/Development/mongo/node-mongodb-native/bench.js:24:18)
          at Object.<anonymous> (/home/mbroadst/Development/mongo/node-mongodb-native/bench.js:78:1)
          at Module._compile (internal/modules/cjs/loader.js:1063:30)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
          at Module.load (internal/modules/cjs/loader.js:928:32)
      

            Assignee:
            daria.pardue@mongodb.com Daria Pardue
            Reporter:
            matt.broadstone@mongodb.com Matt Broadstone
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: