diff options
author | David Bradford <david.bradford@mongodb.com> | 2018-04-26 14:16:57 -0400 |
---|---|---|
committer | David Bradford <david.bradford@mongodb.com> | 2018-04-26 14:54:54 -0400 |
commit | 34333a94de7b68e6881c234a09ab9186a6ac3348 (patch) | |
tree | a9d5bd2003a31b0032d3e4b62e81abc8417987cc /jstests/hooks | |
parent | 681d1e0bf8d45c366848678811bad6f1a471f20c (diff) | |
download | mongo-34333a94de7b68e6881c234a09ab9186a6ac3348.tar.gz |
SERVER-34306: include host in validate error messages
Diffstat (limited to 'jstests/hooks')
-rw-r--r-- | jstests/hooks/validate_collections.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/jstests/hooks/validate_collections.js b/jstests/hooks/validate_collections.js index 71136a3e4cc..ae7b164d38e 100644 --- a/jstests/hooks/validate_collections.js +++ b/jstests/hooks/validate_collections.js @@ -70,7 +70,9 @@ function CollectionValidator() { ' since collection was not found'); continue; } - print('Collection validation failed with response: ' + tojson(res)); + const host = db.getMongo().host; + print('Collection validation failed on host ' + host + ' with response: ' + + tojson(res)); dumpCollection(coll, 100); success = false; } @@ -92,14 +94,14 @@ function CollectionValidator() { const dbNames = conn.getDBNames(); for (let dbName of dbNames) { if (!validatorFunc(conn.getDB(dbName), {full: true})) { - return {ok: 0}; + return {ok: 0, host: host}; } } return {ok: 1}; } catch (e) { print('Exception caught in scoped thread running validationCollections on server: ' + host); - return {ok: 0, error: e.toString(), stack: e.stack}; + return {ok: 0, error: e.toString(), stack: e.stack, host: host}; } }; |