summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/data_consistency_checks.js
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2020-02-17 22:40:59 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-02-18 04:03:33 +0000
commit811b695a37c8c1469b4f6475e62c9a6680b3d95f (patch)
tree37eba8845a07d2904bc6ca292a1ea31475a1168a /jstests/noPassthrough/data_consistency_checks.js
parent95c8fc6a4a98f70b07f32565e3ef3e48172efa1e (diff)
downloadmongo-811b695a37c8c1469b4f6475e62c9a6680b3d95f.tar.gz
SERVER-46026 Fix tests reliant on specific log lines
Diffstat (limited to 'jstests/noPassthrough/data_consistency_checks.js')
-rw-r--r--jstests/noPassthrough/data_consistency_checks.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/jstests/noPassthrough/data_consistency_checks.js b/jstests/noPassthrough/data_consistency_checks.js
index 94c44f3e49b..6da0ebffb61 100644
--- a/jstests/noPassthrough/data_consistency_checks.js
+++ b/jstests/noPassthrough/data_consistency_checks.js
@@ -4,6 +4,7 @@
*
* @tags: [requires_replication, requires_sharding]
*/
+load("jstests/libs/logv2_helpers.js");
// The global 'db' variable is used by the data consistency hooks.
var db;
@@ -17,12 +18,23 @@ TestData.skipCollectionAndIndexValidation = true;
TestData.skipCheckDBHashes = true;
function makePatternForDBHash(dbName) {
+ if (isJsonLogNoConn()) {
+ return new RegExp(
+ `slow query.*"ns":"${dbName}\\.\\$cmd","appName":"MongoDB Shell","command":{"db[Hh]ash`,
+ "g");
+ }
return new RegExp(
"COMMAND.*command " + dbName + "\\.\\$cmd appName: \"MongoDB Shell\" command: db[Hh]ash",
"g");
}
function makePatternForValidate(dbName, collName) {
+ if (isJsonLogNoConn()) {
+ return new RegExp(
+ `slow query.*"ns":"${
+ dbName}\\.\\$cmd","appName":"MongoDB Shell","command":{"validate":"${collName}"`,
+ "g");
+ }
return new RegExp("COMMAND.*command " + dbName +
"\\.\\$cmd appName: \"MongoDB Shell\" command: validate { validate: \"" +
collName + "\"",