{
  "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": null,
      "auth": null,
      "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": null,
      "auth": null,
      "options": {}
    },
    {
      "description": "Too low connectTimeoutMS causes a warning",
      "uri": "mongodb://example.com/?connectTimeoutMS=-2",
      "valid": true,
      "warning": true,
      "hosts": null,
      "auth": null,
      "options": {}
    },
    {
      "description": "Non-numeric heartbeatFrequencyMS causes a warning",
      "uri": "mongodb://example.com/?heartbeatFrequencyMS=invalid",
      "valid": true,
      "warning": true,
      "hosts": null,
      "auth": null,
      "options": {}
    },
    {
      "description": "Too low heartbeatFrequencyMS causes a warning",
      "uri": "mongodb://example.com/?heartbeatFrequencyMS=-2",
      "valid": true,
      "warning": true,
      "hosts": null,
      "auth": null,
      "options": {}
    },
    {
      "description": "Non-numeric localThresholdMS causes a warning",
      "uri": "mongodb://example.com/?localThresholdMS=invalid",
      "valid": true,
      "warning": true,
      "hosts": null,
      "auth": null,
      "options": {}
    },
    {
      "description": "Too low localThresholdMS causes a warning",
      "uri": "mongodb://example.com/?localThresholdMS=-2",
      "valid": true,
      "warning": true,
      "hosts": null,
      "auth": null,
      "options": {}
    },
    {
      "description": "Invalid retryWrites causes a warning",
      "uri": "mongodb://example.com/?retryWrites=invalid",
      "valid": true,
      "warning": true,
      "hosts": null,
      "auth": null,
      "options": {}
    },
    {
      "description": "Non-numeric serverSelectionTimeoutMS causes a warning",
      "uri": "mongodb://example.com/?serverSelectionTimeoutMS=invalid",
      "valid": true,
      "warning": true,
      "hosts": null,
      "auth": null,
      "options": {}
    },
    {
      "description": "Too low serverSelectionTimeoutMS causes a warning",
      "uri": "mongodb://example.com/?serverSelectionTimeoutMS=-2",
      "valid": true,
      "warning": true,
      "hosts": null,
      "auth": null,
      "options": {}
    },
    {
      "description": "Non-numeric socketTimeoutMS causes a warning",
      "uri": "mongodb://example.com/?socketTimeoutMS=invalid",
      "valid": true,
      "warning": true,
      "hosts": null,
      "auth": null,
      "options": {}
    },
    {
      "description": "Too low socketTimeoutMS causes a warning",
      "uri": "mongodb://example.com/?socketTimeoutMS=-2",
      "valid": true,
      "warning": true,
      "hosts": null,
      "auth": null,
      "options": {}
    },
    {
      "description": "directConnection=true",
      "uri": "mongodb://example.com/?directConnection=true",
      "valid": true,
      "warning": false,
      "hosts": null,
      "auth": null,
      "options": {
        "directConnection": true
      }
    },
    {
      "description": "directConnection=true with multiple seeds",
      "uri": "mongodb://example1.com,example2.com/?directConnection=true",
      "valid": false,
      "warning": false,
      "hosts": null,
      "auth": null,
      "options": {}
    },
    {
      "description": "directConnection=false",
      "uri": "mongodb://example.com/?directConnection=false",
      "valid": true,
      "warning": false,
      "hosts": null,
      "auth": null,
      "options": {
        "directConnection": false
      }
    },
    {
      "description": "directConnection=false with multiple seeds",
      "uri": "mongodb://example1.com,example2.com/?directConnection=false",
      "valid": true,
      "warning": false,
      "hosts": null,
      "auth": null,
      "options": {
        "directConnection": false
      }
    },
    {
      "description": "Invalid directConnection value",
      "uri": "mongodb://example.com/?directConnection=invalid",
      "valid": true,
      "warning": true,
      "hosts": null,
      "auth": null,
      "options": {}
    },
    {
      "description": "loadBalanced=true",
      "uri": "mongodb://example.com/?loadBalanced=true",
      "valid": true,
      "warning": false,
      "hosts": null,
      "auth": null,
      "options": {
        "loadBalanced": true
      }
    },
    {
      "description": "loadBalanced=true with directConnection=false",
      "uri": "mongodb://example.com/?loadBalanced=true&directConnection=false",
      "valid": true,
      "warning": false,
      "hosts": null,
      "auth": null,
      "options": {
        "loadBalanced": true,
        "directConnection": false
      }
    },
    {
      "description": "loadBalanced=false",
      "uri": "mongodb://example.com/?loadBalanced=false",
      "valid": true,
      "warning": false,
      "hosts": null,
      "auth": null,
      "options": {
        "loadBalanced": false
      }
    },
    {
      "description": "Invalid loadBalanced value",
      "uri": "mongodb://example.com/?loadBalanced=1",
      "valid": true,
      "warning": true,
      "hosts": null,
      "auth": null,
      "options": {}
    },
    {
      "description": "loadBalanced=true with multiple hosts causes an error",
      "uri": "mongodb://example1,example2/?loadBalanced=true",
      "valid": false,
      "warning": false,
      "hosts": null,
      "auth": null,
      "options": {}
    },
    {
      "description": "loadBalanced=true with directConnection=true causes an error",
      "uri": "mongodb://example.com/?loadBalanced=true&directConnection=true",
      "valid": false,
      "warning": false,
      "hosts": null,
      "auth": null,
      "options": {}
    },
    {
      "description": "loadBalanced=true with replicaSet causes an error",
      "uri": "mongodb://example.com/?loadBalanced=true&replicaSet=replset",
      "valid": false,
      "warning": false,
      "hosts": null,
      "auth": null,
      "options": {}
    }
  ]
}
