diff options
author | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2018-09-18 21:10:36 -0400 |
---|---|---|
committer | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2018-09-18 21:10:36 -0400 |
commit | 78112be586c67efa877636d596b194650e90cbed (patch) | |
tree | 94798cfaa3d2b3e685aa6b15711cad8f0b81d18d /jstests/hooks | |
parent | 118cc1eeb978f9c5c8492368fe6b5a04669fe3c3 (diff) | |
download | mongo-78112be586c67efa877636d596b194650e90cbed.tar.gz |
SERVER-37197 Fix validateCollectionsThread() to check validate result.
It would otherwise silently ignore cases where collection validation had
failed.
Diffstat (limited to 'jstests/hooks')
-rw-r--r-- | jstests/hooks/validate_collections.js | 5 |
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}; |