diff options
author | Jonathan Lee <jonathan.lee@mongodb.com> | 2021-09-09 16:04:29 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-08-10 15:32:36 +0000 |
commit | d890505f7ec3a446393e77f1c270ccbaf0630c66 (patch) | |
tree | e1c5ba959f7c2eba55f4b11b1c7f9dd3200158a0 | |
parent | ce88db86496cb09ffa48222ca057e818a566c02b (diff) | |
download | mongo-d890505f7ec3a446393e77f1c270ccbaf0630c66.tar.gz |
SERVER-55345 exclude noShards commit type from duration assertion in router_transaction_metrics.js
(cherry picked from commit 856e40338a080691f09986756529935683f86e47)
-rw-r--r-- | jstests/noPassthrough/router_transactions_metrics.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/jstests/noPassthrough/router_transactions_metrics.js b/jstests/noPassthrough/router_transactions_metrics.js index 3c8fd681336..4d3ede0b6f2 100644 --- a/jstests/noPassthrough/router_transactions_metrics.js +++ b/jstests/noPassthrough/router_transactions_metrics.js @@ -142,6 +142,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, @@ -159,7 +160,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 + |