Skip to content

Commit 29408b4

Browse files
fix test
1 parent 98cf7b0 commit 29408b4

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/mongo_logger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,11 +650,11 @@ export function defaultLogTransform(
650650
if (logObject.error) {
651651
log.error = logObject.error;
652652
}
653-
log.durationMS = logObject.durationMS;
654653
break;
655654
default:
656655
log.reason = `Unknown close reason: ${logObject.reason}`;
657656
}
657+
log.durationMS = logObject.durationMS;
658658
return log;
659659
case CONNECTION_CHECKED_OUT:
660660
log = attachConnectionFields(log, logObject);

test/integration/connection-monitoring-and-pooling/unified-cmap-node-specs/connection-logging.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,6 @@
110110
"int",
111111
"long"
112112
]
113-
},
114-
"durationMS": {
115-
"$$type": [
116-
"double",
117-
"int",
118-
"long"
119-
]
120113
}
121114
}
122115
},
@@ -198,6 +191,13 @@
198191
"long"
199192
]
200193
},
194+
"durationMS": {
195+
"$$type": [
196+
"double",
197+
"int",
198+
"long"
199+
]
200+
},
201201
"reason": "An error occurred while trying to establish a new connection",
202202
"error": {
203203
"$$exists": true

0 commit comments

Comments
 (0)