Skip to content

Commit d0d780f

Browse files
committed
RUBY-1070 Add missing stepdown rs SDAM test
1 parent b12c91d commit d0d780f

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
description: "Primary becomes a secondary with wrong setName"
2+
3+
uri: "mongodb://a/?replicaSet=rs"
4+
5+
phases: [
6+
7+
# Primary is discovered normally.
8+
{
9+
responses: [
10+
11+
["a:27017", {
12+
13+
ok: 1,
14+
ismaster: true,
15+
hosts: ["a:27017"],
16+
setName: "rs"
17+
}]
18+
],
19+
20+
outcome: {
21+
22+
servers: {
23+
24+
"a:27017": {
25+
26+
type: "RSPrimary",
27+
setName: "rs"
28+
}
29+
},
30+
31+
topologyType: "ReplicaSetWithPrimary",
32+
setName: "rs"
33+
}
34+
},
35+
36+
# Primary changes its setName and becomes secondary.
37+
# Remove it and change the topologyType.
38+
{
39+
responses: [
40+
41+
["a:27017", {
42+
43+
ok: 1,
44+
ismaster: false,
45+
secondary: true,
46+
hosts: ["a:27017"],
47+
setName: "wrong"
48+
}]
49+
],
50+
51+
outcome: {
52+
53+
servers: {},
54+
55+
topologyType: "ReplicaSetNoPrimary",
56+
setName: "rs"
57+
}
58+
}
59+
]

0 commit comments

Comments
 (0)