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