summaryrefslogtreecommitdiff
path: root/jstests/disk
diff options
context:
space:
mode:
authorLouis Williams <louis.williams@mongodb.com>2018-11-26 15:55:34 -0500
committerLouis Williams <louis.williams@mongodb.com>2018-11-26 16:46:05 -0500
commitf534f2b7dc10c412298816ddf9b78631b36f4afd (patch)
treea56b25fa01c99da3b987579f606b29253cd0ee7d /jstests/disk
parent582cdfbdf6aff79b75f36de8be9cf394ef512289 (diff)
downloadmongo-f534f2b7dc10c412298816ddf9b78631b36f4afd.tar.gz
SERVER-38252 Re-enable wt_repair_corrupt_metadata on Windows
Diffstat (limited to 'jstests/disk')
-rw-r--r--jstests/disk/wt_repair_corrupt_metadata.js15
1 files changed, 2 insertions, 13 deletions
diff --git a/jstests/disk/wt_repair_corrupt_metadata.js b/jstests/disk/wt_repair_corrupt_metadata.js
index 02fa8e37f79..6263b18825b 100644
--- a/jstests/disk/wt_repair_corrupt_metadata.js
+++ b/jstests/disk/wt_repair_corrupt_metadata.js
@@ -6,11 +6,6 @@
(function() {
- if (_isWindows()) {
- jsTestLog("Skipping test on Windows");
- return;
- }
-
load('jstests/disk/libs/wt_file_helper.js');
const baseName = "wt_repair_corrupt_metadata";
@@ -82,21 +77,15 @@
// Corrupt the .turtle file in a very specific way such that the log sequence numbers are
// invalid.
if (mongodOptions.hasOwnProperty('journal')) {
- // TODO: This return can be removed once WT-4310 is completed.
- if (isDebug) {
- jsTestLog("Skipping log file corruption because this is a debug build.");
- return;
- }
-
jsTestLog("Corrupting log file metadata");
- let data = cat(turtleFile);
+ let data = cat(turtleFile, true /* useBinaryMode */);
let re = /checkpoint_lsn=\(([0-9,]+)\)/g;
let newData = data.replace(re, "checkpoint_lsn=(1,2)");
print('writing data to new turtle file: \n' + newData);
removeFile(turtleFile);
- writeFile(turtleFile, newData);
+ writeFile(turtleFile, newData, true /* useBinaryMode */);
assertRepairSucceeds(dbpath, mongod.port, mongodOptions);