tests:
    -
        description: "Valid connection and timeout options are parsed correctly"
        uri: "mongodb://example.com/?appname=URI-OPTIONS-SPEC-TEST&connectTimeoutMS=20000&heartbeatFrequencyMS=5000&localThresholdMS=3000&maxIdleTimeMS=50000&replicaSet=uri-options-spec&retryWrites=true&serverSelectionTimeoutMS=15000&socketTimeoutMS=7500"
        valid: true
        warning: false
        hosts: ~
        auth: ~
        options:
            appname: "URI-OPTIONS-SPEC-TEST"
            connectTimeoutMS: 20000
            heartbeatFrequencyMS: 5000
            localThresholdMS: 3000
            maxIdleTimeMS: 50000
            replicaSet: "uri-options-spec"
            retryWrites: true
            serverSelectionTimeoutMS: 15000
            socketTimeoutMS: 7500
    -
        description: "Non-numeric connectTimeoutMS causes a warning"
        uri: "mongodb://example.com/?connectTimeoutMS=invalid"
        valid: true
        warning: true
        hosts: ~
        auth: ~
        options: {}
    -
        description: "Too low connectTimeoutMS causes a warning"
        uri: "mongodb://example.com/?connectTimeoutMS=-2"
        valid: true
        warning: true
        hosts: ~
        auth: ~
        options: {}
    -
        description: "Non-numeric heartbeatFrequencyMS causes a warning"
        uri: "mongodb://example.com/?heartbeatFrequencyMS=invalid"
        valid: true
        warning: true
        hosts: ~
        auth: ~
        options: {}
    -
        description: "Too low heartbeatFrequencyMS causes a warning"
        uri: "mongodb://example.com/?heartbeatFrequencyMS=-2"
        valid: true
        warning: true
        hosts: ~
        auth: ~
        options: {}
    -
        description: "Non-numeric localThresholdMS causes a warning"
        uri: "mongodb://example.com/?localThresholdMS=invalid"
        valid: true
        warning: true
        hosts: ~
        auth: ~
        options: {}
    -
        description: "Too low localThresholdMS causes a warning"
        uri: "mongodb://example.com/?localThresholdMS=-2"
        valid: true
        warning: true
        hosts: ~
        auth: ~
        options: {}
    - 
        description: "Invalid retryWrites causes a warning"
        uri: "mongodb://example.com/?retryWrites=invalid"
        valid: true
        warning: true
        hosts: ~
        auth: ~
        options: {}
    -
        description: "Non-numeric serverSelectionTimeoutMS causes a warning"
        uri: "mongodb://example.com/?serverSelectionTimeoutMS=invalid"
        valid: true
        warning: true
        hosts: ~
        auth: ~
        options: {}
    -
        description: "Too low serverSelectionTimeoutMS causes a warning"
        uri: "mongodb://example.com/?serverSelectionTimeoutMS=-2"
        valid: true
        warning: true
        hosts: ~
        auth: ~
        options: {}
    -
        description: "Non-numeric socketTimeoutMS causes a warning"
        uri: "mongodb://example.com/?socketTimeoutMS=invalid"
        valid: true
        warning: true
        hosts: ~
        auth: ~
        options: {}
    -
        description: "Too low socketTimeoutMS causes a warning"
        uri: "mongodb://example.com/?socketTimeoutMS=-2"
        valid: true
        warning: true
        hosts: ~
        auth: ~
        options: {}
    -
      description: directConnection=true
      uri: "mongodb://example.com/?directConnection=true"
      valid: true
      warning: false
      hosts: ~
      auth: ~
      options:
          directConnection: true
    -
      description: directConnection=true with multiple seeds
      uri: "mongodb://example1.com,example2.com/?directConnection=true"
      valid: false
      warning: false
      hosts: ~
      auth: ~
      options: {}
    -
      description: directConnection=false
      uri: "mongodb://example.com/?directConnection=false"
      valid: true
      warning: false
      hosts: ~
      auth: ~
      options:
          directConnection: false
    -
      description: directConnection=false with multiple seeds
      uri: "mongodb://example1.com,example2.com/?directConnection=false"
      valid: true
      warning: false
      hosts: ~
      auth: ~
      options:
          directConnection: false
    -
      description: Invalid directConnection value
      uri: "mongodb://example.com/?directConnection=invalid"
      valid: true
      warning: true
      hosts: ~
      auth: ~
      options: {}
    -
      description: loadBalanced=true
      uri: "mongodb://example.com/?loadBalanced=true"
      valid: true
      warning: false
      hosts: ~
      auth: ~
      options:
          loadBalanced: true
    -
      description: loadBalanced=true with directConnection=false
      uri: "mongodb://example.com/?loadBalanced=true&directConnection=false"
      valid: true
      warning: false
      hosts: ~
      auth: ~
      options:
          loadBalanced: true
          directConnection: false
    -
      description: loadBalanced=false
      uri: "mongodb://example.com/?loadBalanced=false"
      valid: true
      warning: false
      hosts: ~
      auth: ~
      options:
          loadBalanced: false
    -
      description: Invalid loadBalanced value
      uri: "mongodb://example.com/?loadBalanced=1"
      valid: true
      warning: true
      hosts: ~
      auth: ~
      options: {}
    -
      description: loadBalanced=true with multiple hosts causes an error
      uri: "mongodb://example1,example2/?loadBalanced=true"
      valid: false
      warning: false
      hosts: ~
      auth: ~
      options: {}
    -
      description: loadBalanced=true with directConnection=true causes an error
      uri: "mongodb://example.com/?loadBalanced=true&directConnection=true"
      valid: false
      warning: false
      hosts: ~
      auth: ~
      options: {}
    -
      description: loadBalanced=true with replicaSet causes an error
      uri: "mongodb://example.com/?loadBalanced=true&replicaSet=replset"
      valid: false
      warning: false
      hosts: ~
      auth: ~
      options: {}
