1{
2 "runOn": [
3 {
4 "minServerVersion": "4.9"
5 }
6 ],
7 "database_name": "sdam-tests",
8 "collection_name": "hello-command-error",
9 "data": [],
10 "tests": [
11 {
12 "description": "Command error 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": "commandErrorHandshakeTest",
24 "closeConnection": false,
25 "errorCode": 91
26 }
27 },
28 "clientOptions": {
29 "retryWrites": false,
30 "connectTimeoutMS": 250,
31 "heartbeatFrequencyMS": 500,
32 "appname": "commandErrorHandshakeTest"
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-command-error",
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": "Command error on Monitor check",
92 "clientOptions": {
93 "retryWrites": false,
94 "connectTimeoutMS": 1000,
95 "heartbeatFrequencyMS": 500,
96 "appname": "commandErrorCheckTest"
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": "commandErrorCheckTest",
128 "closeConnection": false,
129 "blockConnection": true,
130 "blockTimeMS": 750,
131 "errorCode": 91
132 }
133 }
134 }
135 },
136 {
137 "name": "waitForEvent",
138 "object": "testRunner",
139 "arguments": {
140 "event": "ServerMarkedUnknownEvent",
141 "count": 1
142 }
143 },
144 {
145 "name": "waitForEvent",
146 "object": "testRunner",
147 "arguments": {
148 "event": "PoolClearedEvent",
149 "count": 1
150 }
151 },
152 {
153 "name": "insertMany",
154 "object": "collection",
155 "arguments": {
156 "documents": [
157 {
158 "_id": 3
159 },
160 {
161 "_id": 4
162 }
163 ]
164 }
165 }
166 ],
167 "expectations": [
168 {
169 "command_started_event": {
170 "command": {
171 "insert": "hello-command-error",
172 "documents": [
173 {
174 "_id": 1
175 },
176 {
177 "_id": 2
178 }
179 ]
180 },
181 "command_name": "insert",
182 "database_name": "sdam-tests"
183 }
184 },
185 {
186 "command_started_event": {
187 "command": {
188 "insert": "hello-command-error",
189 "documents": [
190 {
191 "_id": 3
192 },
193 {
194 "_id": 4
195 }
196 ]
197 },
198 "command_name": "insert",
199 "database_name": "sdam-tests"
200 }
201 }
202 ],
203 "outcome": {
204 "collection": {
205 "data": [
206 {
207 "_id": 1
208 },
209 {
210 "_id": 2
211 },
212 {
213 "_id": 3
214 },
215 {
216 "_id": 4
217 }
218 ]
219 }
220 }
221 }
222 ]
223}
View as plain text