summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Lee <jonathan.lee@mongodb.com>2021-09-09 16:04:29 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-08-09 21:30:41 +0000
commitfdf8ebad385373697ba8ee72993ca662290369e0 (patch)
treeb9e8b1933ca040e888957d79a0590cfa40c0a762
parent6f918f3fed2333aa3d1ac213bd8176743a733895 (diff)
downloadmongo-fdf8ebad385373697ba8ee72993ca662290369e0.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.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 +