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