File tree Expand file tree Collapse file tree 1 file changed +59
-0
lines changed Expand file tree Collapse file tree 1 file changed +59
-0
lines changed Original file line number Diff line number Diff line change
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
+ ]
You can’t perform that action at this time.
0 commit comments