From fb08d4e18b6fc61924514a7785352c735c1cceeb Mon Sep 17 00:00:00 2001 From: Daniel Vitor Morilha Date: Mon, 20 Dec 2021 16:31:08 +0000 Subject: SERVER-58257 Add actual vs. expected message for when stats asserts fail (cherry picked from commit 3b81b9afedd26f9ff6352441e9e9eb075a43b3cf) --- jstests/noPassthrough/predictive_connpool.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'jstests') 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; } -- cgit v1.2.1