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:26:42 +0000 |
commit | 7c44523a40af295c95fadbb4550d114bedeab424 (patch) | |
tree | 075b7f3cbb7d2c7078353381f83ee2670d85ce48 | |
parent | 368d3162b1c865814cb87b29ec3e204c542a17ed (diff) | |
download | mongo-7c44523a40af295c95fadbb4550d114bedeab424.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 26862306599..3fa4d757a8e 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 + |