1{
2 "runOn": [
3 {
4 "minServerVersion": "4.4",
5 "topology": [
6 "replicaset"
7 ]
8 }
9 ],
10 "database_name": "sdam-tests",
11 "collection_name": "test-replSetStepDown",
12 "data": [
13 {
14 "_id": 1
15 },
16 {
17 "_id": 2
18 }
19 ],
20 "tests": [
21 {
22 "description": "Rediscover quickly after replSetStepDown",
23 "clientOptions": {
24 "appname": "replSetStepDownTest",
25 "heartbeatFrequencyMS": 60000,
26 "serverSelectionTimeoutMS": 5000,
27 "w": "majority"
28 },
29 "operations": [
30 {
31 "name": "insertMany",
32 "object": "collection",
33 "arguments": {
34 "documents": [
35 {
36 "_id": 3
37 },
38 {
39 "_id": 4
40 }
41 ]
42 }
43 },
44 {
45 "name": "recordPrimary",
46 "object": "testRunner"
47 },
48 {
49 "name": "runAdminCommand",
50 "object": "testRunner",
51 "command_name": "replSetFreeze",
52 "arguments": {
53 "command": {
54 "replSetFreeze": 0
55 },
56 "readPreference": {
57 "mode": "Secondary"
58 }
59 }
60 },
61 {
62 "name": "runAdminCommand",
63 "object": "testRunner",
64 "command_name": "replSetStepDown",
65 "arguments": {
66 "command": {
67 "replSetStepDown": 30,
68 "secondaryCatchUpPeriodSecs": 30,
69 "force": false
70 }
71 }
72 },
73 {
74 "name": "waitForPrimaryChange",
75 "object": "testRunner",
76 "arguments": {
77 "timeoutMS": 15000
78 }
79 },
80 {
81 "name": "insertMany",
82 "object": "collection",
83 "arguments": {
84 "documents": [
85 {
86 "_id": 5
87 },
88 {
89 "_id": 6
90 }
91 ]
92 }
93 },
94 {
95 "name": "assertEventCount",
96 "object": "testRunner",
97 "arguments": {
98 "event": "PoolClearedEvent",
99 "count": 0
100 }
101 }
102 ],
103 "expectations": [
104 {
105 "command_started_event": {
106 "command": {
107 "insert": "test-replSetStepDown",
108 "documents": [
109 {
110 "_id": 3
111 },
112 {
113 "_id": 4
114 }
115 ]
116 },
117 "command_name": "insert",
118 "database_name": "sdam-tests"
119 }
120 },
121 {
122 "command_started_event": {
123 "command": {
124 "insert": "test-replSetStepDown",
125 "documents": [
126 {
127 "_id": 5
128 },
129 {
130 "_id": 6
131 }
132 ]
133 },
134 "command_name": "insert",
135 "database_name": "sdam-tests"
136 }
137 }
138 ],
139 "outcome": {
140 "collection": {
141 "data": [
142 {
143 "_id": 1
144 },
145 {
146 "_id": 2
147 },
148 {
149 "_id": 3
150 },
151 {
152 "_id": 4
153 },
154 {
155 "_id": 5
156 },
157 {
158 "_id": 6
159 }
160 ]
161 }
162 }
163 }
164 ]
165}
View as plain text