1{
2 "description": "bulkWrite-delete-hint-serverError",
3 "schemaVersion": "1.0",
4 "runOnRequirements": [
5 {
6 "minServerVersion": "3.4.0",
7 "maxServerVersion": "4.3.3"
8 }
9 ],
10 "createEntities": [
11 {
12 "client": {
13 "id": "client0",
14 "observeEvents": [
15 "commandStartedEvent"
16 ]
17 }
18 },
19 {
20 "database": {
21 "id": "database0",
22 "client": "client0",
23 "databaseName": "crud-v2"
24 }
25 },
26 {
27 "collection": {
28 "id": "collection0",
29 "database": "database0",
30 "collectionName": "BulkWrite_delete_hint"
31 }
32 }
33 ],
34 "initialData": [
35 {
36 "collectionName": "BulkWrite_delete_hint",
37 "databaseName": "crud-v2",
38 "documents": [
39 {
40 "_id": 1,
41 "x": 11
42 },
43 {
44 "_id": 2,
45 "x": 22
46 },
47 {
48 "_id": 3,
49 "x": 33
50 },
51 {
52 "_id": 4,
53 "x": 44
54 }
55 ]
56 }
57 ],
58 "tests": [
59 {
60 "description": "BulkWrite deleteOne with hints unsupported (server-side error)",
61 "operations": [
62 {
63 "object": "collection0",
64 "name": "bulkWrite",
65 "arguments": {
66 "requests": [
67 {
68 "deleteOne": {
69 "filter": {
70 "_id": 1
71 },
72 "hint": "_id_"
73 }
74 },
75 {
76 "deleteOne": {
77 "filter": {
78 "_id": 2
79 },
80 "hint": {
81 "_id": 1
82 }
83 }
84 }
85 ],
86 "ordered": true
87 },
88 "expectError": {
89 "isError": true
90 }
91 }
92 ],
93 "expectEvents": [
94 {
95 "client": "client0",
96 "events": [
97 {
98 "commandStartedEvent": {
99 "command": {
100 "delete": "BulkWrite_delete_hint",
101 "deletes": [
102 {
103 "q": {
104 "_id": 1
105 },
106 "hint": "_id_",
107 "limit": 1
108 },
109 {
110 "q": {
111 "_id": 2
112 },
113 "hint": {
114 "_id": 1
115 },
116 "limit": 1
117 }
118 ],
119 "ordered": true
120 }
121 }
122 }
123 ]
124 }
125 ],
126 "outcome": [
127 {
128 "collectionName": "BulkWrite_delete_hint",
129 "databaseName": "crud-v2",
130 "documents": [
131 {
132 "_id": 1,
133 "x": 11
134 },
135 {
136 "_id": 2,
137 "x": 22
138 },
139 {
140 "_id": 3,
141 "x": 33
142 },
143 {
144 "_id": 4,
145 "x": 44
146 }
147 ]
148 }
149 ]
150 },
151 {
152 "description": "BulkWrite deleteMany with hints unsupported (server-side error)",
153 "operations": [
154 {
155 "object": "collection0",
156 "name": "bulkWrite",
157 "arguments": {
158 "requests": [
159 {
160 "deleteMany": {
161 "filter": {
162 "_id": {
163 "$lt": 3
164 }
165 },
166 "hint": "_id_"
167 }
168 },
169 {
170 "deleteMany": {
171 "filter": {
172 "_id": {
173 "$gte": 4
174 }
175 },
176 "hint": {
177 "_id": 1
178 }
179 }
180 }
181 ],
182 "ordered": true
183 },
184 "expectError": {
185 "isError": true
186 }
187 }
188 ],
189 "expectEvents": [
190 {
191 "client": "client0",
192 "events": [
193 {
194 "commandStartedEvent": {
195 "command": {
196 "delete": "BulkWrite_delete_hint",
197 "deletes": [
198 {
199 "q": {
200 "_id": {
201 "$lt": 3
202 }
203 },
204 "hint": "_id_",
205 "limit": 0
206 },
207 {
208 "q": {
209 "_id": {
210 "$gte": 4
211 }
212 },
213 "hint": {
214 "_id": 1
215 },
216 "limit": 0
217 }
218 ],
219 "ordered": true
220 }
221 }
222 }
223 ]
224 }
225 ],
226 "outcome": [
227 {
228 "collectionName": "BulkWrite_delete_hint",
229 "databaseName": "crud-v2",
230 "documents": [
231 {
232 "_id": 1,
233 "x": 11
234 },
235 {
236 "_id": 2,
237 "x": 22
238 },
239 {
240 "_id": 3,
241 "x": 33
242 },
243 {
244 "_id": 4,
245 "x": 44
246 }
247 ]
248 }
249 ]
250 }
251 ]
252}
View as plain text