Skip to content

Commit 62a4335

Browse files
committed
Sync spec tests
JAVA-5528
1 parent 11f55c6 commit 62a4335

18 files changed

+7171
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,218 @@
1+
{
2+
"description": "unacknowledged-client-bulkWrite",
3+
"schemaVersion": "1.7",
4+
"runOnRequirements": [
5+
{
6+
"minServerVersion": "8.0"
7+
}
8+
],
9+
"createEntities": [
10+
{
11+
"client": {
12+
"id": "client",
13+
"useMultipleMongoses": false,
14+
"observeEvents": [
15+
"commandStartedEvent",
16+
"commandSucceededEvent",
17+
"commandFailedEvent"
18+
],
19+
"uriOptions": {
20+
"w": 0
21+
}
22+
}
23+
},
24+
{
25+
"database": {
26+
"id": "database",
27+
"client": "client",
28+
"databaseName": "command-monitoring-tests"
29+
}
30+
},
31+
{
32+
"collection": {
33+
"id": "collection",
34+
"database": "database",
35+
"collectionName": "test"
36+
}
37+
}
38+
],
39+
"initialData": [
40+
{
41+
"collectionName": "test",
42+
"databaseName": "command-monitoring-tests",
43+
"documents": [
44+
{
45+
"_id": 1,
46+
"x": 11
47+
},
48+
{
49+
"_id": 2,
50+
"x": 22
51+
},
52+
{
53+
"_id": 3,
54+
"x": 33
55+
}
56+
]
57+
}
58+
],
59+
"_yamlAnchors": {
60+
"namespace": "command-monitoring-tests.test"
61+
},
62+
"tests": [
63+
{
64+
"description": "A successful mixed client bulkWrite",
65+
"operations": [
66+
{
67+
"object": "client",
68+
"name": "clientBulkWrite",
69+
"arguments": {
70+
"models": [
71+
{
72+
"insertOne": {
73+
"namespace": "command-monitoring-tests.test",
74+
"document": {
75+
"_id": 4,
76+
"x": 44
77+
}
78+
}
79+
},
80+
{
81+
"updateOne": {
82+
"namespace": "command-monitoring-tests.test",
83+
"filter": {
84+
"_id": 3
85+
},
86+
"update": {
87+
"$set": {
88+
"x": 333
89+
}
90+
}
91+
}
92+
}
93+
]
94+
},
95+
"expectResult": {
96+
"insertedCount": {
97+
"$$unsetOrMatches": 0
98+
},
99+
"upsertedCount": {
100+
"$$unsetOrMatches": 0
101+
},
102+
"matchedCount": {
103+
"$$unsetOrMatches": 0
104+
},
105+
"modifiedCount": {
106+
"$$unsetOrMatches": 0
107+
},
108+
"deletedCount": {
109+
"$$unsetOrMatches": 0
110+
},
111+
"insertResults": {
112+
"$$unsetOrMatches": {}
113+
},
114+
"updateResults": {
115+
"$$unsetOrMatches": {}
116+
},
117+
"deleteResults": {
118+
"$$unsetOrMatches": {}
119+
}
120+
}
121+
},
122+
{
123+
"object": "collection",
124+
"name": "find",
125+
"arguments": {
126+
"filter": {}
127+
},
128+
"expectResult": [
129+
{
130+
"_id": 1,
131+
"x": 11
132+
},
133+
{
134+
"_id": 2,
135+
"x": 22
136+
},
137+
{
138+
"_id": 3,
139+
"x": 333
140+
},
141+
{
142+
"_id": 4,
143+
"x": 44
144+
}
145+
]
146+
}
147+
],
148+
"expectEvents": [
149+
{
150+
"client": "client",
151+
"ignoreExtraEvents": true,
152+
"events": [
153+
{
154+
"commandStartedEvent": {
155+
"commandName": "bulkWrite",
156+
"databaseName": "admin",
157+
"command": {
158+
"bulkWrite": 1,
159+
"errorsOnly": true,
160+
"ordered": true,
161+
"ops": [
162+
{
163+
"insert": 0,
164+
"document": {
165+
"_id": 4,
166+
"x": 44
167+
}
168+
},
169+
{
170+
"update": 0,
171+
"filter": {
172+
"_id": 3
173+
},
174+
"updateMods": {
175+
"$set": {
176+
"x": 333
177+
}
178+
},
179+
"multi": false
180+
}
181+
],
182+
"nsInfo": [
183+
{
184+
"ns": "command-monitoring-tests.test"
185+
}
186+
]
187+
}
188+
}
189+
},
190+
{
191+
"commandSucceededEvent": {
192+
"commandName": "bulkWrite",
193+
"reply": {
194+
"ok": 1,
195+
"nInserted": {
196+
"$$exists": false
197+
},
198+
"nMatched": {
199+
"$$exists": false
200+
},
201+
"nModified": {
202+
"$$exists": false
203+
},
204+
"nUpserted": {
205+
"$$exists": false
206+
},
207+
"nDeleted": {
208+
"$$exists": false
209+
}
210+
}
211+
}
212+
}
213+
]
214+
}
215+
]
216+
}
217+
]
218+
}

0 commit comments

Comments
 (0)