summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jstests/noPassthrough/router_transactions_metrics.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/jstests/noPassthrough/router_transactions_metrics.js b/jstests/noPassthrough/router_transactions_metrics.js
index 966a74624ce..f74b6d596af 100644
--- a/jstests/noPassthrough/router_transactions_metrics.js
+++ b/jstests/noPassthrough/router_transactions_metrics.js
@@ -146,6 +146,7 @@ function verifyServerStatusValues(st, expectedStats) {
"unexpected totalRequestsTargeted, res: " + tojson(stats));
const commitTypes = res.transactions.commitTypes;
+ const noShardsCommit = "noShards";
Object.keys(commitTypes).forEach((commitType) => {
assert.eq(
expectedStats.commitTypes[commitType].initiated,
@@ -163,7 +164,7 @@ function verifyServerStatusValues(st, expectedStats) {
expectedStats.commitTypes[commitType].successfulDurationMicros =
commitTypes[commitType].successfulDurationMicros;
- if (commitTypes[commitType].successful != 0) {
+ if (commitTypes[commitType].successful != 0 && commitType !== noShardsCommit) {
assert.gt(commitTypes[commitType].successfulDurationMicros,
0,
"unexpected successfulDurationMicros for " + commitType +