| 1 |
{ |
| 2 |
"description": "unacknowledged-write", |
| 3 |
"schemaVersion": "1.16", |
| 4 |
"createEntities": [ |
| 5 |
{ |
| 6 |
"client": { |
| 7 |
"id": "client", |
| 8 |
"useMultipleMongoses": false, |
| 9 |
"observeLogMessages": { |
| 10 |
"command": "debug" |
| 11 |
} |
| 12 |
} |
| 13 |
}, |
| 14 |
{ |
| 15 |
"database": { |
| 16 |
"id": "database", |
| 17 |
"client": "client", |
| 18 |
"databaseName": "logging-tests" |
| 19 |
} |
| 20 |
}, |
| 21 |
{ |
| 22 |
"collection": { |
| 23 |
"id": "collection", |
| 24 |
"database": "database", |
| 25 |
"collectionName": "logging-tests-collection", |
| 26 |
"collectionOptions": { |
| 27 |
"writeConcern": { |
| 28 |
"w": 0 |
| 29 |
} |
| 30 |
} |
| 31 |
} |
| 32 |
} |
| 33 |
], |
| 34 |
"initialData": [ |
| 35 |
{ |
| 36 |
"collectionName": "logging-tests-collection", |
| 37 |
"databaseName": "logging-tests", |
| 38 |
"documents": [ |
| 39 |
{ |
| 40 |
"_id": 1 |
| 41 |
} |
| 42 |
] |
| 43 |
} |
| 44 |
], |
| 45 |
"tests": [ |
| 46 |
{ |
| 47 |
"description": "An unacknowledged write generates a succeeded log message with ok: 1 reply", |
| 48 |
"operations": [ |
| 49 |
{ |
| 50 |
"name": "insertOne", |
| 51 |
"object": "collection", |
| 52 |
"arguments": { |
| 53 |
"document": { |
| 54 |
"_id": 2 |
| 55 |
} |
| 56 |
} |
| 57 |
}, |
| 58 |
{ |
| 59 |
"name": "find", |
| 60 |
"object": "collection", |
| 61 |
"arguments": { |
| 62 |
"filter": {} |
| 63 |
}, |
| 64 |
"expectResult": [ |
| 65 |
{ |
| 66 |
"_id": 1 |
| 67 |
}, |
| 68 |
{ |
| 69 |
"_id": 2 |
| 70 |
} |
| 71 |
] |
| 72 |
} |
| 73 |
], |
| 74 |
"expectLogMessages": [ |
| 75 |
{ |
| 76 |
"client": "client", |
| 77 |
"ignoreExtraMessages": true, |
| 78 |
"messages": [ |
| 79 |
{ |
| 80 |
"level": "debug", |
| 81 |
"component": "command", |
| 82 |
"data": { |
| 83 |
"message": "Command started", |
| 84 |
"databaseName": "logging-tests", |
| 85 |
"commandName": "insert", |
| 86 |
"command": { |
| 87 |
"$$matchAsDocument": { |
| 88 |
"$$matchAsRoot": { |
| 89 |
"insert": "logging-tests-collection", |
| 90 |
"$db": "logging-tests" |
| 91 |
} |
| 92 |
} |
| 93 |
}, |
| 94 |
"requestId": { |
| 95 |
"$$type": [ |
| 96 |
"int", |
| 97 |
"long" |
| 98 |
] |
| 99 |
}, |
| 100 |
"serverHost": { |
| 101 |
"$$type": "string" |
| 102 |
}, |
| 103 |
"serverPort": { |
| 104 |
"$$type": [ |
| 105 |
"int", |
| 106 |
"long" |
| 107 |
] |
| 108 |
} |
| 109 |
} |
| 110 |
}, |
| 111 |
{ |
| 112 |
"level": "debug", |
| 113 |
"component": "command", |
| 114 |
"data": { |
| 115 |
"message": "Command succeeded", |
| 116 |
"commandName": "insert", |
| 117 |
"reply": { |
| 118 |
"$$matchAsDocument": { |
| 119 |
"ok": 1 |
| 120 |
} |
| 121 |
}, |
| 122 |
"requestId": { |
| 123 |
"$$type": [ |
| 124 |
"int", |
| 125 |
"long" |
| 126 |
] |
| 127 |
}, |
| 128 |
"serverHost": { |
| 129 |
"$$type": "string" |
| 130 |
}, |
| 131 |
"serverPort": { |
| 132 |
"$$type": [ |
| 133 |
"int", |
| 134 |
"long" |
| 135 |
] |
| 136 |
}, |
| 137 |
"durationMS": { |
| 138 |
"$$type": [ |
| 139 |
"double", |
| 140 |
"int", |
| 141 |
"long" |
| 142 |
] |
| 143 |
} |
| 144 |
} |
| 145 |
} |
| 146 |
] |
| 147 |
} |
| 148 |
] |
| 149 |
} |
| 150 |
] |
| 151 |
} |