-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
7,171 additions
and
1 deletion.
There are no files selected for viewing
218 changes: 218 additions & 0 deletions
218
...est/resources/unified-test-format/command-monitoring/unacknowledged-client-bulkWrite.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,218 @@ | ||
{ | ||
"description": "unacknowledged-client-bulkWrite", | ||
"schemaVersion": "1.7", | ||
"runOnRequirements": [ | ||
{ | ||
"minServerVersion": "8.0" | ||
} | ||
], | ||
"createEntities": [ | ||
{ | ||
"client": { | ||
"id": "client", | ||
"useMultipleMongoses": false, | ||
"observeEvents": [ | ||
"commandStartedEvent", | ||
"commandSucceededEvent", | ||
"commandFailedEvent" | ||
], | ||
"uriOptions": { | ||
"w": 0 | ||
} | ||
} | ||
}, | ||
{ | ||
"database": { | ||
"id": "database", | ||
"client": "client", | ||
"databaseName": "command-monitoring-tests" | ||
} | ||
}, | ||
{ | ||
"collection": { | ||
"id": "collection", | ||
"database": "database", | ||
"collectionName": "test" | ||
} | ||
} | ||
], | ||
"initialData": [ | ||
{ | ||
"collectionName": "test", | ||
"databaseName": "command-monitoring-tests", | ||
"documents": [ | ||
{ | ||
"_id": 1, | ||
"x": 11 | ||
}, | ||
{ | ||
"_id": 2, | ||
"x": 22 | ||
}, | ||
{ | ||
"_id": 3, | ||
"x": 33 | ||
} | ||
] | ||
} | ||
], | ||
"_yamlAnchors": { | ||
"namespace": "command-monitoring-tests.test" | ||
}, | ||
"tests": [ | ||
{ | ||
"description": "A successful mixed client bulkWrite", | ||
"operations": [ | ||
{ | ||
"object": "client", | ||
"name": "clientBulkWrite", | ||
"arguments": { | ||
"models": [ | ||
{ | ||
"insertOne": { | ||
"namespace": "command-monitoring-tests.test", | ||
"document": { | ||
"_id": 4, | ||
"x": 44 | ||
} | ||
} | ||
}, | ||
{ | ||
"updateOne": { | ||
"namespace": "command-monitoring-tests.test", | ||
"filter": { | ||
"_id": 3 | ||
}, | ||
"update": { | ||
"$set": { | ||
"x": 333 | ||
} | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"expectResult": { | ||
"insertedCount": { | ||
"$$unsetOrMatches": 0 | ||
}, | ||
"upsertedCount": { | ||
"$$unsetOrMatches": 0 | ||
}, | ||
"matchedCount": { | ||
"$$unsetOrMatches": 0 | ||
}, | ||
"modifiedCount": { | ||
"$$unsetOrMatches": 0 | ||
}, | ||
"deletedCount": { | ||
"$$unsetOrMatches": 0 | ||
}, | ||
"insertResults": { | ||
"$$unsetOrMatches": {} | ||
}, | ||
"updateResults": { | ||
"$$unsetOrMatches": {} | ||
}, | ||
"deleteResults": { | ||
"$$unsetOrMatches": {} | ||
} | ||
} | ||
}, | ||
{ | ||
"object": "collection", | ||
"name": "find", | ||
"arguments": { | ||
"filter": {} | ||
}, | ||
"expectResult": [ | ||
{ | ||
"_id": 1, | ||
"x": 11 | ||
}, | ||
{ | ||
"_id": 2, | ||
"x": 22 | ||
}, | ||
{ | ||
"_id": 3, | ||
"x": 333 | ||
}, | ||
{ | ||
"_id": 4, | ||
"x": 44 | ||
} | ||
] | ||
} | ||
], | ||
"expectEvents": [ | ||
{ | ||
"client": "client", | ||
"ignoreExtraEvents": true, | ||
"events": [ | ||
{ | ||
"commandStartedEvent": { | ||
"commandName": "bulkWrite", | ||
"databaseName": "admin", | ||
"command": { | ||
"bulkWrite": 1, | ||
"errorsOnly": true, | ||
"ordered": true, | ||
"ops": [ | ||
{ | ||
"insert": 0, | ||
"document": { | ||
"_id": 4, | ||
"x": 44 | ||
} | ||
}, | ||
{ | ||
"update": 0, | ||
"filter": { | ||
"_id": 3 | ||
}, | ||
"updateMods": { | ||
"$set": { | ||
"x": 333 | ||
} | ||
}, | ||
"multi": false | ||
} | ||
], | ||
"nsInfo": [ | ||
{ | ||
"ns": "command-monitoring-tests.test" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"commandSucceededEvent": { | ||
"commandName": "bulkWrite", | ||
"reply": { | ||
"ok": 1, | ||
"nInserted": { | ||
"$$exists": false | ||
}, | ||
"nMatched": { | ||
"$$exists": false | ||
}, | ||
"nModified": { | ||
"$$exists": false | ||
}, | ||
"nUpserted": { | ||
"$$exists": false | ||
}, | ||
"nDeleted": { | ||
"$$exists": false | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.