diff options
author | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2021-07-19 14:50:52 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-07-19 16:19:31 +0000 |
commit | 4a0bdf9ced7988dd0f95ae03b157839904e6af59 (patch) | |
tree | 19181a8207ff5576c91629727741ae0391a1303b /jstests/disk | |
parent | 8fd4cd2c997692e3d40afad84064203d71a3127f (diff) | |
download | mongo-4a0bdf9ced7988dd0f95ae03b157839904e6af59.tar.gz |
SERVER-58661 Print raw logs in wt_file_helper.js when rawMongoProgramOutput() cannot find the string pattern
Diffstat (limited to 'jstests/disk')
-rw-r--r-- | jstests/disk/libs/wt_file_helper.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/jstests/disk/libs/wt_file_helper.js b/jstests/disk/libs/wt_file_helper.js index 6b345fe4806..862d189c85d 100644 --- a/jstests/disk/libs/wt_file_helper.js +++ b/jstests/disk/libs/wt_file_helper.js @@ -207,7 +207,13 @@ let assertErrorOnRequestWhenFilesAreCorruptOrMissing = function( requestFunc(testColl); // Get an expected error message. - assert.gte(rawMongoProgramOutput().search(errmsgRegExp), 0); + const rawLogs = rawMongoProgramOutput(); + const matchedIndex = rawLogs.search(errmsgRegExp); + if (matchedIndex < 0) { + jsTestLog("String pattern not found in rawMongoProgramOutput(): " + rawLogs); + } + + assert.gte(matchedIndex, 0); MongoRunner.stopMongod(mongod, 9, {allowedExitCode: MongoRunner.EXIT_ABRUPT}); }; |