1{
2 "runOn": [
3 {
4 "minServerVersion": "4.4"
5 }
6 ],
7 "database_name": "sdam-tests",
8 "collection_name": "hello-timeout",
9 "data": [],
10 "tests": [
11 {
12 "description": "Network timeout on Monitor handshake",
13 "failPoint": {
14 "configureFailPoint": "failCommand",
15 "mode": {
16 "times": 2
17 },
18 "data": {
19 "failCommands": [
20 "hello",
21 "isMaster"
22 ],
23 "appName": "timeoutMonitorHandshakeTest",
24 "blockConnection": true,
25 "blockTimeMS": 1000
26 }
27 },
28 "clientOptions": {
29 "retryWrites": false,
30 "connectTimeoutMS": 250,
31 "heartbeatFrequencyMS": 500,
32 "appname": "timeoutMonitorHandshakeTest"
33 },
34 "operations": [
35 {
36 "name": "waitForEvent",
37 "object": "testRunner",
38 "arguments": {
39 "event": "ServerMarkedUnknownEvent",
40 "count": 1
41 }
42 },
43 {
44 "name": "insertMany",
45 "object": "collection",
46 "arguments": {
47 "documents": [
48 {
49 "_id": 1
50 },
51 {
52 "_id": 2
53 }
54 ]
55 }
56 }
57 ],
58 "expectations": [
59 {
60 "command_started_event": {
61 "command": {
62 "insert": "hello-timeout",
63 "documents": [
64 {
65 "_id": 1
66 },
67 {
68 "_id": 2
69 }
70 ]
71 },
72 "command_name": "insert",
73 "database_name": "sdam-tests"
74 }
75 }
76 ],
77 "outcome": {
78 "collection": {
79 "data": [
80 {
81 "_id": 1
82 },
83 {
84 "_id": 2
85 }
86 ]
87 }
88 }
89 },
90 {
91 "description": "Network timeout on Monitor check",
92 "clientOptions": {
93 "retryWrites": false,
94 "connectTimeoutMS": 750,
95 "heartbeatFrequencyMS": 500,
96 "appname": "timeoutMonitorCheckTest"
97 },
98 "operations": [
99 {
100 "name": "insertMany",
101 "object": "collection",
102 "arguments": {
103 "documents": [
104 {
105 "_id": 1
106 },
107 {
108 "_id": 2
109 }
110 ]
111 }
112 },
113 {
114 "name": "configureFailPoint",
115 "object": "testRunner",
116 "arguments": {
117 "failPoint": {
118 "configureFailPoint": "failCommand",
119 "mode": {
120 "times": 4
121 },
122 "data": {
123 "failCommands": [
124 "hello",
125 "isMaster"
126 ],
127 "appName": "timeoutMonitorCheckTest",
128 "blockConnection": true,
129 "blockTimeMS": 1000
130 }
131 }
132 }
133 },
134 {
135 "name": "waitForEvent",
136 "object": "testRunner",
137 "arguments": {
138 "event": "ServerMarkedUnknownEvent",
139 "count": 1
140 }
141 },
142 {
143 "name": "waitForEvent",
144 "object": "testRunner",
145 "arguments": {
146 "event": "PoolClearedEvent",
147 "count": 1
148 }
149 },
150 {
151 "name": "insertMany",
152 "object": "collection",
153 "arguments": {
154 "documents": [
155 {
156 "_id": 3
157 },
158 {
159 "_id": 4
160 }
161 ]
162 }
163 }
164 ],
165 "expectations": [
166 {
167 "command_started_event": {
168 "command": {
169 "insert": "hello-timeout",
170 "documents": [
171 {
172 "_id": 1
173 },
174 {
175 "_id": 2
176 }
177 ]
178 },
179 "command_name": "insert",
180 "database_name": "sdam-tests"
181 }
182 },
183 {
184 "command_started_event": {
185 "command": {
186 "insert": "hello-timeout",
187 "documents": [
188 {
189 "_id": 3
190 },
191 {
192 "_id": 4
193 }
194 ]
195 },
196 "command_name": "insert",
197 "database_name": "sdam-tests"
198 }
199 }
200 ],
201 "outcome": {
202 "collection": {
203 "data": [
204 {
205 "_id": 1
206 },
207 {
208 "_id": 2
209 },
210 {
211 "_id": 3
212 },
213 {
214 "_id": 4
215 }
216 ]
217 }
218 }
219 },
220 {
221 "description": "Driver extends timeout while streaming",
222 "clientOptions": {
223 "retryWrites": false,
224 "connectTimeoutMS": 250,
225 "heartbeatFrequencyMS": 500,
226 "appname": "extendsTimeoutTest"
227 },
228 "operations": [
229 {
230 "name": "insertMany",
231 "object": "collection",
232 "arguments": {
233 "documents": [
234 {
235 "_id": 1
236 },
237 {
238 "_id": 2
239 }
240 ]
241 }
242 },
243 {
244 "name": "wait",
245 "object": "testRunner",
246 "arguments": {
247 "ms": 2000
248 }
249 },
250 {
251 "name": "insertMany",
252 "object": "collection",
253 "arguments": {
254 "documents": [
255 {
256 "_id": 3
257 },
258 {
259 "_id": 4
260 }
261 ]
262 }
263 },
264 {
265 "name": "assertEventCount",
266 "object": "testRunner",
267 "arguments": {
268 "event": "ServerMarkedUnknownEvent",
269 "count": 0
270 }
271 },
272 {
273 "name": "assertEventCount",
274 "object": "testRunner",
275 "arguments": {
276 "event": "PoolClearedEvent",
277 "count": 0
278 }
279 }
280 ],
281 "expectations": [
282 {
283 "command_started_event": {
284 "command": {
285 "insert": "hello-timeout",
286 "documents": [
287 {
288 "_id": 1
289 },
290 {
291 "_id": 2
292 }
293 ]
294 },
295 "command_name": "insert",
296 "database_name": "sdam-tests"
297 }
298 },
299 {
300 "command_started_event": {
301 "command": {
302 "insert": "hello-timeout",
303 "documents": [
304 {
305 "_id": 3
306 },
307 {
308 "_id": 4
309 }
310 ]
311 },
312 "command_name": "insert",
313 "database_name": "sdam-tests"
314 }
315 }
316 ],
317 "outcome": {
318 "collection": {
319 "data": [
320 {
321 "_id": 1
322 },
323 {
324 "_id": 2
325 },
326 {
327 "_id": 3
328 },
329 {
330 "_id": 4
331 }
332 ]
333 }
334 }
335 }
336 ]
337}
View as plain text