mongo-python-driver/test/retryable_writes/unified/updateMany.json

113 lines
2.1 KiB
JSON

{
"description": "updateMany",
"schemaVersion": "1.3",
"runOnRequirements": [
{
"minServerVersion": "3.6",
"topologies": [
"replicaset",
"sharded",
"load-balanced"
]
}
],
"createEntities": [
{
"client": {
"id": "client0",
"useMultipleMongoses": true,
"observeEvents": [
"commandStartedEvent"
]
}
},
{
"database": {
"id": "database0",
"client": "client0",
"databaseName": "retryable-writes-tests"
}
},
{
"collection": {
"id": "collection0",
"database": "database0",
"collectionName": "coll"
}
}
],
"initialData": [
{
"collectionName": "coll",
"databaseName": "retryable-writes-tests",
"documents": [
{
"_id": 1,
"x": 11
},
{
"_id": 2,
"x": 22
}
]
}
],
"tests": [
{
"description": "UpdateMany ignores retryWrites",
"operations": [
{
"object": "collection0",
"name": "updateMany",
"arguments": {
"filter": {},
"update": {
"$inc": {
"x": 1
}
}
},
"expectResult": {
"matchedCount": 2,
"modifiedCount": 2,
"upsertedCount": 0
}
}
],
"outcome": [
{
"collectionName": "coll",
"databaseName": "retryable-writes-tests",
"documents": [
{
"_id": 1,
"x": 12
},
{
"_id": 2,
"x": 23
}
]
}
],
"expectEvents": [
{
"client": "client0",
"events": [
{
"commandStartedEvent": {
"commandName": "update",
"command": {
"txnNumber": {
"$$exists": false
}
}
}
}
]
}
]
}
]
}