1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
|
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: {}
|