Skip to content

Commit 99704fa

Browse files
authored
DRIVERS-3403 test empty tag set matches servers with no tags (#1899)
1 parent becb8c4 commit 99704fa

2 files changed

Lines changed: 68 additions & 0 deletions

File tree

source/server-selection/tests/server_selection/ReplicaSetWithPrimary/read/SecondaryPreferred_empty_tags.json

Lines changed: 41 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Attempt to select the secondary using an empty tag set. Expect empty tag set to match.
2+
# This is a regression test for RUST-2363.
3+
---
4+
topology_description:
5+
type: ReplicaSetWithPrimary
6+
servers:
7+
- &1
8+
address: a:27017
9+
avg_rtt_ms: 5
10+
type: RSPrimary
11+
# No "tags".
12+
- &2
13+
address: b:27017
14+
avg_rtt_ms: 5
15+
type: RSSecondary
16+
# No "tags"
17+
operation: read
18+
read_preference:
19+
mode: SecondaryPreferred
20+
tag_sets:
21+
- data_center: nyc # Does not match.
22+
- {} # Empty tag set.
23+
suitable_servers:
24+
- *2
25+
in_latency_window:
26+
- *2
27+

0 commit comments

Comments
 (0)