Skip to content

Commit 2ef3f43

Browse files
committed
Test that readPreferenceTags are always interpreted as an array
JAVA-3681
1 parent a5e8347 commit 2ef3f43

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

driver-core/src/test/resources/uri-options/read-preference-options.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,21 @@
2121
"maxStalenessSeconds": 120
2222
}
2323
},
24+
{
25+
"description": "Single readPreferenceTags is parsed as array of size one",
26+
"uri": "mongodb://example.com/?readPreference=secondary&readPreferenceTags=dc:ny",
27+
"valid": true,
28+
"warning": false,
29+
"hosts": null,
30+
"auth": null,
31+
"options": {
32+
"readPreferenceTags": [
33+
{
34+
"dc": "ny"
35+
}
36+
]
37+
}
38+
},
2439
{
2540
"description": "Invalid readPreferenceTags causes a warning",
2641
"uri": "mongodb://example.com/?readPreferenceTags=invalid",

0 commit comments

Comments
 (0)