summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Hirschhorn <max.hirschhorn@mongodb.com>2018-09-18 21:10:36 -0400
committerMax Hirschhorn <max.hirschhorn@mongodb.com>2018-09-18 21:10:36 -0400
commit78112be586c67efa877636d596b194650e90cbed (patch)
tree94798cfaa3d2b3e685aa6b15711cad8f0b81d18d
parent118cc1eeb978f9c5c8492368fe6b5a04669fe3c3 (diff)
downloadmongo-78112be586c67efa877636d596b194650e90cbed.tar.gz
SERVER-37197 Fix validateCollectionsThread() to check validate result.
It would otherwise silently ignore cases where collection validation had failed.
-rw-r--r--jstests/hooks/validate_collections.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/jstests/hooks/validate_collections.js b/jstests/hooks/validate_collections.js
index 29ba74e46cc..0575bfdf532 100644
--- a/jstests/hooks/validate_collections.js
+++ b/jstests/hooks/validate_collections.js
@@ -103,8 +103,9 @@ function CollectionValidator() {
const dbNames = conn.getDBNames();
for (let dbName of dbNames) {
- if (!validatorFunc(conn.getDB(dbName), {full: true})) {
- return {ok: 0, host: host};
+ const validateRes = validatorFunc(conn.getDB(dbName), {full: true});
+ if (validateRes.ok !== 1) {
+ return {ok: 0, host: host, validateRes: validateRes};
}
}
return {ok: 1};