summaryrefslogtreecommitdiff
path: root/jstests/multiVersion/initial_sync_drop_against_last_stable.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/multiVersion/initial_sync_drop_against_last_stable.js')
-rw-r--r--jstests/multiVersion/initial_sync_drop_against_last_stable.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/jstests/multiVersion/initial_sync_drop_against_last_stable.js b/jstests/multiVersion/initial_sync_drop_against_last_stable.js
index a7969a7f0d6..e36a2a8606e 100644
--- a/jstests/multiVersion/initial_sync_drop_against_last_stable.js
+++ b/jstests/multiVersion/initial_sync_drop_against_last_stable.js
@@ -2,6 +2,7 @@
* Test that CollectionCloner completes without error when a collection is dropped during cloning,
* specifically when that sync source is in 4.2.
*/
+load("jstests/libs/logv2_helpers.js");
(function() {
"use strict";
@@ -99,8 +100,12 @@ function finishTest({failPoint, expectedLog, waitForDrop, createNew}) {
assert.commandWorked(secondary.adminCommand({configureFailPoint: failPoint, mode: 'off'}));
if (expectedLog) {
- jsTestLog(eval(expectedLog));
- checkLog.contains(secondary, eval(expectedLog));
+ expectedLog = eval(expectedLog);
+ if (isJsonLog(primaryColl.getMongo())) {
+ expectedLog = expectedLog.replace(/"/g, "\\\"");
+ }
+ jsTestLog(expectedLog);
+ checkLog.contains(secondary, expectedLog);
}
jsTestLog("Waiting for initial sync to complete.");