Skip to content

Commit b1b8b07

Browse files
committed
pr
1 parent a42ca19 commit b1b8b07

2 files changed

Lines changed: 97 additions & 3 deletions

File tree

specifications/connection-monitoring-and-pooling/tests/logging/connection-logging.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,73 @@
201201
}
202202
}
203203
},
204+
{
205+
"level": "debug",
206+
"component": "connection",
207+
"data": {
208+
"message": "Connection checkout started",
209+
"serverHost": {
210+
"$$type": "string"
211+
},
212+
"serverPort": {
213+
"$$type": [
214+
"int",
215+
"long"
216+
]
217+
}
218+
}
219+
},
220+
{
221+
"level": "debug",
222+
"component": "connection",
223+
"data": {
224+
"message": "Connection checked out",
225+
"driverConnectionId": {
226+
"$$type": [
227+
"int",
228+
"long"
229+
]
230+
},
231+
"serverHost": {
232+
"$$type": "string"
233+
},
234+
"serverPort": {
235+
"$$type": [
236+
"int",
237+
"long"
238+
]
239+
},
240+
"durationMS": {
241+
"$$type": [
242+
"double",
243+
"int",
244+
"long"
245+
]
246+
}
247+
}
248+
},
249+
{
250+
"level": "debug",
251+
"component": "connection",
252+
"data": {
253+
"message": "Connection checked in",
254+
"driverConnectionId": {
255+
"$$type": [
256+
"int",
257+
"long"
258+
]
259+
},
260+
"serverHost": {
261+
"$$type": "string"
262+
},
263+
"serverPort": {
264+
"$$type": [
265+
"int",
266+
"long"
267+
]
268+
}
269+
}
270+
},
204271
{
205272
"level": "debug",
206273
"component": "connection",

specifications/connection-monitoring-and-pooling/tests/logging/connection-logging.yml

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,40 @@ tests:
8585
serverHost: { $$type: string }
8686
serverPort: { $$type: [int, long] }
8787

88+
# The next three expected logs are for ending a session.
89+
- level: debug
90+
component: connection
91+
data:
92+
message: "Connection checkout started"
93+
serverHost: { $$type: string }
94+
serverPort: { $$type: [int, long] }
95+
96+
- level: debug
97+
component: connection
98+
data:
99+
message: "Connection checked out"
100+
driverConnectionId: { $$type: [int, long] }
101+
serverHost: { $$type: string }
102+
serverPort: { $$type: [int, long] }
103+
durationMS: { $$type: [double, int, long] }
104+
105+
- level: debug
106+
component: connection
107+
data:
108+
message: "Connection checked in"
109+
driverConnectionId: { $$type: [int, long] }
110+
serverHost: { $$type: string }
111+
serverPort: { $$type: [int, long] }
112+
88113
- level: debug
89114
component: connection
90115
data:
91116
message: "Connection closed"
92117
driverConnectionId: { $$type: [int, long] }
93118
serverHost: { $$type: string }
94119
serverPort: { $$type: [int, long] }
95-
reason: "Connection pool was closed"
120+
reason: "Unknown" # CSharp Driver does not support closeReason
121+
#reason: "Connection pool was closed"
96122

97123
- level: debug
98124
component: connection
@@ -185,8 +211,9 @@ tests:
185211
driverConnectionId: { $$type: [int, long] }
186212
serverHost: { $$type: string }
187213
serverPort: { $$type: [int, long] }
188-
reason: "An error occurred while using the connection"
189-
error: { $$exists: true }
214+
reason: "Unknown" # CSharp Driver does not support closeReason
215+
# reason: "An error occurred while using the connection"
216+
# error: { $$exists: true }
190217

191218
- level: debug
192219
component: connection

0 commit comments

Comments
 (0)