| 1 |
description: connection establishment if loadBalanced is specified for non-load balanced clusters |
| 2 |
|
| 3 |
schemaVersion: '1.3' |
| 4 |
|
| 5 |
runOnRequirements: |
| 6 |
|
| 7 |
|
| 8 |
- topologies: [ single, sharded ] |
| 9 |
|
| 10 |
createEntities: |
| 11 |
- client: |
| 12 |
id: &lbTrueClient lbTrueClient |
| 13 |
|
| 14 |
|
| 15 |
useMultipleMongoses: false |
| 16 |
uriOptions: |
| 17 |
loadBalanced: true |
| 18 |
- database: |
| 19 |
id: &lbTrueDatabase lbTrueDatabase |
| 20 |
client: *lbTrueClient |
| 21 |
databaseName: &lbTrueDatabaseName lbTrueDb |
| 22 |
- client: |
| 23 |
id: &lbFalseClient lbFalseClient |
| 24 |
uriOptions: |
| 25 |
loadBalanced: false |
| 26 |
- database: |
| 27 |
id: &lbFalseDatabase lbFalseDatabase |
| 28 |
client: *lbFalseClient |
| 29 |
databaseName: &lbFalseDatabaseName lbFalseDb |
| 30 |
|
| 31 |
_yamlAnchors: |
| 32 |
runCommandArguments: |
| 33 |
- &pingArguments |
| 34 |
arguments: |
| 35 |
commandName: ping |
| 36 |
command: { ping: 1 } |
| 37 |
|
| 38 |
tests: |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
- description: operations against non-load balanced clusters fail if URI contains loadBalanced=true |
| 45 |
operations: |
| 46 |
- name: runCommand |
| 47 |
object: *lbTrueDatabase |
| 48 |
<<: *pingArguments |
| 49 |
expectError: |
| 50 |
errorContains: Driver attempted to initialize in load balancing mode, but the server does not support this mode |
| 51 |
|
| 52 |
- description: operations against non-load balanced clusters succeed if URI contains loadBalanced=false |
| 53 |
operations: |
| 54 |
- name: runCommand |
| 55 |
object: *lbFalseDatabase |
| 56 |
<<: *pingArguments |