Skip to content

Commit 76c1c58

Browse files
add new tests
1 parent 8dd306b commit 76c1c58

File tree

50 files changed

+2159
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2159
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"topology_description": {
3+
"type": "ReplicaSetNoPrimary",
4+
"servers": [
5+
{
6+
"address": "b:27017",
7+
"avg_rtt_ms": 5,
8+
"type": "RSSecondary",
9+
"tags": {
10+
"data_center": "nyc"
11+
}
12+
},
13+
{
14+
"address": "c:27017",
15+
"avg_rtt_ms": 100,
16+
"type": "RSSecondary",
17+
"tags": {
18+
"data_center": "nyc"
19+
}
20+
}
21+
]
22+
},
23+
"operation": "read",
24+
"read_preference": {
25+
"mode": "Nearest",
26+
"tag_sets": [
27+
{
28+
"data_center": "nyc"
29+
}
30+
]
31+
},
32+
"deprioritized_servers": [
33+
{
34+
"address": "b:27017",
35+
"avg_rtt_ms": 5,
36+
"type": "RSSecondary",
37+
"tags": {
38+
"data_center": "nyc"
39+
}
40+
}
41+
],
42+
"suitable_servers": [
43+
{
44+
"address": "c:27017",
45+
"avg_rtt_ms": 100,
46+
"type": "RSSecondary",
47+
"tags": {
48+
"data_center": "nyc"
49+
}
50+
}
51+
],
52+
"in_latency_window": [
53+
{
54+
"address": "c:27017",
55+
"avg_rtt_ms": 100,
56+
"type": "RSSecondary",
57+
"tags": {
58+
"data_center": "nyc"
59+
}
60+
}
61+
]
62+
}
63+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
topology_description:
2+
type: ReplicaSetNoPrimary
3+
servers:
4+
- &1
5+
address: b:27017
6+
avg_rtt_ms: 5
7+
type: RSSecondary
8+
tags:
9+
data_center: nyc
10+
- &2
11+
address: c:27017
12+
avg_rtt_ms: 100
13+
type: RSSecondary
14+
tags:
15+
data_center: nyc
16+
operation: read
17+
read_preference:
18+
mode: Nearest
19+
tag_sets:
20+
- data_center: nyc
21+
deprioritized_servers:
22+
- *1
23+
suitable_servers:
24+
- *2
25+
in_latency_window:
26+
- *2
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"topology_description": {
3+
"type": "ReplicaSetNoPrimary",
4+
"servers": [
5+
{
6+
"address": "b:27017",
7+
"avg_rtt_ms": 5,
8+
"type": "RSSecondary",
9+
"tags": {
10+
"data_center": "nyc"
11+
}
12+
},
13+
{
14+
"address": "c:27017",
15+
"avg_rtt_ms": 100,
16+
"type": "RSSecondary",
17+
"tags": {
18+
"data_center": "nyc"
19+
}
20+
}
21+
]
22+
},
23+
"operation": "read",
24+
"read_preference": {
25+
"mode": "Primary"
26+
},
27+
"deprioritized_servers": [
28+
{
29+
"address": "b:27017",
30+
"avg_rtt_ms": 5,
31+
"type": "RSSecondary",
32+
"tags": {
33+
"data_center": "nyc"
34+
}
35+
}
36+
],
37+
"suitable_servers": [],
38+
"in_latency_window": []
39+
}
40+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
topology_description:
2+
type: ReplicaSetNoPrimary
3+
servers:
4+
- &1
5+
address: b:27017
6+
avg_rtt_ms: 5
7+
type: RSSecondary
8+
tags:
9+
data_center: nyc
10+
- &2
11+
address: c:27017
12+
avg_rtt_ms: 100
13+
type: RSSecondary
14+
tags:
15+
data_center: nyc
16+
operation: read
17+
read_preference:
18+
mode: Primary
19+
deprioritized_servers:
20+
- *1
21+
suitable_servers: []
22+
in_latency_window: []
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"topology_description": {
3+
"type": "ReplicaSetNoPrimary",
4+
"servers": [
5+
{
6+
"address": "b:27017",
7+
"avg_rtt_ms": 5,
8+
"type": "RSSecondary",
9+
"tags": {
10+
"data_center": "nyc"
11+
}
12+
},
13+
{
14+
"address": "c:27017",
15+
"avg_rtt_ms": 100,
16+
"type": "RSSecondary",
17+
"tags": {
18+
"data_center": "nyc"
19+
}
20+
}
21+
]
22+
},
23+
"operation": "read",
24+
"read_preference": {
25+
"mode": "PrimaryPreferred",
26+
"tag_sets": [
27+
{
28+
"data_center": "nyc"
29+
}
30+
]
31+
},
32+
"deprioritized_servers": [
33+
{
34+
"address": "b:27017",
35+
"avg_rtt_ms": 5,
36+
"type": "RSSecondary",
37+
"tags": {
38+
"data_center": "nyc"
39+
}
40+
}
41+
],
42+
"suitable_servers": [
43+
{
44+
"address": "c:27017",
45+
"avg_rtt_ms": 100,
46+
"type": "RSSecondary",
47+
"tags": {
48+
"data_center": "nyc"
49+
}
50+
}
51+
],
52+
"in_latency_window": [
53+
{
54+
"address": "c:27017",
55+
"avg_rtt_ms": 100,
56+
"type": "RSSecondary",
57+
"tags": {
58+
"data_center": "nyc"
59+
}
60+
}
61+
]
62+
}
63+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
topology_description:
2+
type: ReplicaSetNoPrimary
3+
servers:
4+
- &1
5+
address: b:27017
6+
avg_rtt_ms: 5
7+
type: RSSecondary
8+
tags:
9+
data_center: nyc
10+
- &2
11+
address: c:27017
12+
avg_rtt_ms: 100
13+
type: RSSecondary
14+
tags:
15+
data_center: nyc
16+
operation: read
17+
read_preference:
18+
mode: PrimaryPreferred
19+
tag_sets:
20+
- data_center: nyc
21+
deprioritized_servers:
22+
- *1
23+
suitable_servers:
24+
- *2
25+
in_latency_window:
26+
- *2
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"topology_description": {
3+
"type": "ReplicaSetNoPrimary",
4+
"servers": [
5+
{
6+
"address": "b:27017",
7+
"avg_rtt_ms": 5,
8+
"type": "RSSecondary",
9+
"tags": {
10+
"data_center": "nyc"
11+
}
12+
},
13+
{
14+
"address": "c:27017",
15+
"avg_rtt_ms": 100,
16+
"type": "RSSecondary",
17+
"tags": {
18+
"data_center": "nyc"
19+
}
20+
}
21+
]
22+
},
23+
"operation": "read",
24+
"read_preference": {
25+
"mode": "Secondary",
26+
"tag_sets": [
27+
{
28+
"data_center": "nyc"
29+
}
30+
]
31+
},
32+
"deprioritized_servers": [
33+
{
34+
"address": "b:27017",
35+
"avg_rtt_ms": 5,
36+
"type": "RSSecondary",
37+
"tags": {
38+
"data_center": "nyc"
39+
}
40+
}
41+
],
42+
"suitable_servers": [
43+
{
44+
"address": "c:27017",
45+
"avg_rtt_ms": 100,
46+
"type": "RSSecondary",
47+
"tags": {
48+
"data_center": "nyc"
49+
}
50+
}
51+
],
52+
"in_latency_window": [
53+
{
54+
"address": "c:27017",
55+
"avg_rtt_ms": 100,
56+
"type": "RSSecondary",
57+
"tags": {
58+
"data_center": "nyc"
59+
}
60+
}
61+
]
62+
}
63+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
topology_description:
2+
type: ReplicaSetNoPrimary
3+
servers:
4+
- &1
5+
address: b:27017
6+
avg_rtt_ms: 5
7+
type: RSSecondary
8+
tags:
9+
data_center: nyc
10+
- &2
11+
address: c:27017
12+
avg_rtt_ms: 100
13+
type: RSSecondary
14+
tags:
15+
data_center: nyc
16+
operation: read
17+
read_preference:
18+
mode: Secondary
19+
tag_sets:
20+
- data_center: nyc
21+
deprioritized_servers:
22+
- *1
23+
suitable_servers:
24+
- *2
25+
in_latency_window:
26+
- *2

0 commit comments

Comments
 (0)