diff options
author | Daniel Vitor Morilha <daniel.morilha@mongodb.com> | 2021-12-20 16:31:08 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-06-03 20:18:37 +0000 |
commit | fb08d4e18b6fc61924514a7785352c735c1cceeb (patch) | |
tree | 8adf608f0a462135fc0a38dc151c9090eb38d11c /jstests | |
parent | c01852d88959b1bae0582c780af764711da765ef (diff) | |
download | mongo-fb08d4e18b6fc61924514a7785352c735c1cceeb.tar.gz |
SERVER-58257 Add actual vs. expected message for when stats asserts fail
(cherry picked from commit 3b81b9afedd26f9ff6352441e9e9eb075a43b3cf)
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/noPassthrough/predictive_connpool.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/jstests/noPassthrough/predictive_connpool.js b/jstests/noPassthrough/predictive_connpool.js index be44b9ee920..be307a6e318 100644 --- a/jstests/noPassthrough/predictive_connpool.js +++ b/jstests/noPassthrough/predictive_connpool.js @@ -85,6 +85,18 @@ function hasConnPoolStats(args) { } jsTestLog("Connection stats for " + host + ": " + tojson(stats)); + if (stats.available != ready) { + jsTestLog("Different stats for the \"available\" field. Actual: " + stats.available + + ", Expected: " + ready); + } + if (stats.refreshing != pending) { + jsTestLog("Different stats for the \"refreshing\" field. Actual: " + stats.refreshing + + ", Expected: " + pending); + } + if (stats.inUse != active) { + jsTestLog("Different stats for the \"inUse\" field. Actual: " + stats.inUse + + ", Expected: " + active); + } return stats.available == ready && stats.refreshing == pending && stats.inUse == active; } |