Skip to content

Commit cb7f625

Browse files
committed
Update server discovery and monitoring specification tests to the most recent version
1 parent ee8a932 commit cb7f625

10 files changed

+675
-538
lines changed

driver-core/src/test/resources/server-discovery-and-monitoring-monitoring/replica_set_with_no_primary.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
"arbiters": [],
135135
"hosts": [],
136136
"passives": [],
137-
"type": "Unknown"
137+
"type": "PossiblePrimary"
138138
}
139139
]
140140
}

driver-core/src/test/resources/server-discovery-and-monitoring-monitoring/replica_set_with_primary.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@
121121
"address": "a:27017",
122122
"arbiters": [],
123123
"hosts": [
124-
"a:27017",
125-
"b:27017"
124+
"a:27017", "b:27017"
126125
],
127126
"passives": [],
128127
"primary": "a:27017",
Lines changed: 84 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,123 +1,123 @@
11
{
2-
"description": "New primary with greater setVersion",
2+
"description": "New primary with greater setVersion",
3+
"uri": "mongodb://a/?replicaSet=rs",
34
"phases": [
45
{
6+
"responses": [
7+
[
8+
"a:27017",
9+
{
10+
"ok": 1,
11+
"ismaster": true,
12+
"hosts": [
13+
"a:27017",
14+
"b:27017"
15+
],
16+
"setName": "rs",
17+
"setVersion": 1,
18+
"electionId": {
19+
"$oid": "000000000000000000000001"
20+
}
21+
}
22+
]
23+
],
524
"outcome": {
625
"servers": {
726
"a:27017": {
27+
"type": "RSPrimary",
28+
"setName": "rs",
29+
"setVersion": 1,
830
"electionId": {
931
"$oid": "000000000000000000000001"
10-
},
11-
"setName": "rs",
12-
"setVersion": 1,
13-
"type": "RSPrimary"
14-
},
32+
}
33+
},
1534
"b:27017": {
16-
"electionId": null,
17-
"setName": null,
18-
"type": "Unknown"
35+
"type": "Unknown",
36+
"setName": null,
37+
"electionId": null
1938
}
20-
},
21-
"setName": "rs",
22-
"topologyType": "ReplicaSetWithPrimary"
23-
},
39+
},
40+
"topologyType": "ReplicaSetWithPrimary",
41+
"setName": "rs"
42+
}
43+
},
44+
{
2445
"responses": [
2546
[
26-
"a:27017",
47+
"b:27017",
2748
{
28-
"electionId": {
29-
"$oid": "000000000000000000000001"
30-
},
49+
"ok": 1,
50+
"ismaster": true,
3151
"hosts": [
32-
"a:27017",
52+
"a:27017",
3353
"b:27017"
34-
],
35-
"ismaster": true,
36-
"ok": 1,
37-
"setName": "rs",
38-
"setVersion": 1
54+
],
55+
"setName": "rs",
56+
"setVersion": 2,
57+
"electionId": {
58+
"$oid": "000000000000000000000001"
59+
}
3960
}
4061
]
41-
]
42-
},
43-
{
62+
],
4463
"outcome": {
4564
"servers": {
4665
"a:27017": {
47-
"electionId": null,
48-
"setName": null,
49-
"type": "Unknown"
50-
},
66+
"type": "Unknown",
67+
"setName": null,
68+
"electionId": null
69+
},
5170
"b:27017": {
71+
"type": "RSPrimary",
72+
"setName": "rs",
73+
"setVersion": 2,
5274
"electionId": {
5375
"$oid": "000000000000000000000001"
54-
},
55-
"setName": "rs",
56-
"setVersion": 2,
57-
"type": "RSPrimary"
76+
}
5877
}
59-
},
60-
"setName": "rs",
61-
"topologyType": "ReplicaSetWithPrimary"
62-
},
78+
},
79+
"topologyType": "ReplicaSetWithPrimary",
80+
"setName": "rs"
81+
}
82+
},
83+
{
6384
"responses": [
6485
[
65-
"b:27017",
86+
"a:27017",
6687
{
67-
"electionId": {
68-
"$oid": "000000000000000000000001"
69-
},
88+
"ok": 1,
89+
"ismaster": true,
7090
"hosts": [
71-
"a:27017",
91+
"a:27017",
7292
"b:27017"
73-
],
74-
"ismaster": true,
75-
"ok": 1,
76-
"setName": "rs",
77-
"setVersion": 2
93+
],
94+
"setName": "rs",
95+
"setVersion": 1,
96+
"electionId": {
97+
"$oid": "000000000000000000000001"
98+
}
7899
}
79100
]
80-
]
81-
},
82-
{
101+
],
83102
"outcome": {
84103
"servers": {
85104
"a:27017": {
86-
"electionId": null,
87-
"setName": null,
88-
"type": "Unknown"
89-
},
105+
"type": "Unknown",
106+
"setName": null,
107+
"electionId": null
108+
},
90109
"b:27017": {
110+
"type": "RSPrimary",
111+
"setName": "rs",
112+
"setVersion": 2,
91113
"electionId": {
92114
"$oid": "000000000000000000000001"
93-
},
94-
"setName": "rs",
95-
"setVersion": 2,
96-
"type": "RSPrimary"
115+
}
97116
}
98-
},
99-
"setName": "rs",
100-
"topologyType": "ReplicaSetWithPrimary"
101-
},
102-
"responses": [
103-
[
104-
"a:27017",
105-
{
106-
"electionId": {
107-
"$oid": "000000000000000000000001"
108-
},
109-
"hosts": [
110-
"a:27017",
111-
"b:27017"
112-
],
113-
"ismaster": true,
114-
"ok": 1,
115-
"setName": "rs",
116-
"setVersion": 1
117-
}
118-
]
119-
]
117+
},
118+
"topologyType": "ReplicaSetWithPrimary",
119+
"setName": "rs"
120+
}
120121
}
121-
],
122-
"uri": "mongodb://a/?replicaSet=rs"
123-
}
122+
]
123+
}

0 commit comments

Comments
 (0)