Debian Codegraph @

src/libmongoc/tests/json/command-logging-and-monitoring/monitoring/writeConcernError.json

raw
1 {
2 "description": "writeConcernError",
3 "schemaVersion": "1.4",
4 "runOnRequirements": [
5 {
6 "minServerVersion": "4.3.1",
7 "topologies": [
8 "replicaset"
9 ],
10 "serverless": "forbid"
11 }
12 ],
13 "createEntities": [
14 {
15 "client": {
16 "id": "client",
17 "observeEvents": [
18 "commandStartedEvent",
19 "commandSucceededEvent",
20 "commandFailedEvent"
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 }
50 ],
51 "tests": [
52 {
53 "description": "A retryable write with write concern errors publishes success event",
54 "operations": [
55 {
56 "name": "failPoint",
57 "object": "testRunner",
58 "arguments": {
59 "client": "client",
60 "failPoint": {
61 "configureFailPoint": "failCommand",
62 "mode": {
63 "times": 1
64 },
65 "data": {
66 "failCommands": [
67 "insert"
68 ],
69 "errorLabels": [
70 "RetryableWriteError"
71 ],
72 "writeConcernError": {
73 "code": 91
74 }
75 }
76 }
77 }
78 },
79 {
80 "name": "insertOne",
81 "object": "collection",
82 "arguments": {
83 "document": {
84 "_id": 2,
85 "x": 22
86 }
87 }
88 }
89 ],
90 "expectEvents": [
91 {
92 "client": "client",
93 "events": [
94 {
95 "commandStartedEvent": {
96 "command": {
97 "insert": "test",
98 "documents": [
99 {
100 "_id": 2,
101 "x": 22
102 }
103 ],
104 "ordered": true
105 },
106 "commandName": "insert",
107 "databaseName": "command-monitoring-tests"
108 }
109 },
110 {
111 "commandSucceededEvent": {
112 "reply": {
113 "ok": 1,
114 "n": 1,
115 "errorLabels": [
116 "RetryableWriteError"
117 ],
118 "writeConcernError": {
119 "code": 91
120 }
121 },
122 "commandName": "insert"
123 }
124 },
125 {
126 "commandStartedEvent": {
127 "command": {
128 "insert": "test",
129 "documents": [
130 {
131 "_id": 2,
132 "x": 22
133 }
134 ],
135 "ordered": true
136 },
137 "commandName": "insert",
138 "databaseName": "command-monitoring-tests"
139 }
140 },
141 {
142 "commandSucceededEvent": {
143 "reply": {
144 "ok": 1,
145 "n": 1
146 },
147 "commandName": "insert"
148 }
149 }
150 ]
151 }
152 ]
153 }
154 ]
155 }