summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
Diffstat (limited to 'jstests')
-rw-r--r--jstests/disk/libs/wt_file_helper.js8
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});
};