Skip to content

Commit b77e88f

Browse files
committed
Test PossiblePrimary isn't candidate for any read pref.
1 parent ca9d70b commit b77e88f

File tree

4 files changed

+72
-0
lines changed

4 files changed

+72
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"in_latency_window": [],
3+
"operation": "read",
4+
"read_preference": {
5+
"mode": "Primary",
6+
"tag_sets": [
7+
{}
8+
]
9+
},
10+
"suitable_servers": [],
11+
"topology_description": {
12+
"servers": [
13+
{
14+
"address": "b:27017",
15+
"avg_rtt_ms": 5,
16+
"type": "PossiblePrimary"
17+
}
18+
],
19+
"type": "ReplicaSetNoPrimary"
20+
}
21+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Test that PossiblePrimary isn't candidate for any read preference mode.
2+
---
3+
topology_description:
4+
type: ReplicaSetNoPrimary
5+
servers:
6+
- address: b:27017
7+
avg_rtt_ms: 5
8+
type: PossiblePrimary
9+
operation: read
10+
read_preference:
11+
mode: Primary
12+
tag_sets:
13+
- {}
14+
suitable_servers: []
15+
in_latency_window: []
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"in_latency_window": [],
3+
"operation": "read",
4+
"read_preference": {
5+
"mode": "Nearest",
6+
"tag_sets": [
7+
{}
8+
]
9+
},
10+
"suitable_servers": [],
11+
"topology_description": {
12+
"servers": [
13+
{
14+
"address": "b:27017",
15+
"avg_rtt_ms": 5,
16+
"type": "PossiblePrimary"
17+
}
18+
],
19+
"type": "ReplicaSetNoPrimary"
20+
}
21+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Test that PossiblePrimary isn't candidate for any read preference mode.
2+
---
3+
topology_description:
4+
type: ReplicaSetNoPrimary
5+
servers:
6+
- address: b:27017
7+
avg_rtt_ms: 5
8+
type: PossiblePrimary
9+
operation: read
10+
read_preference:
11+
mode: Nearest
12+
tag_sets:
13+
- {}
14+
suitable_servers: []
15+
in_latency_window: []

0 commit comments

Comments
 (0)