summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Williams <louis.williams@mongodb.com>2018-11-26 18:05:00 -0500
committerLouis Williams <louis.williams@mongodb.com>2018-11-26 18:05:00 -0500
commit65afd95ebe12305877f357227b99d231ffd85d39 (patch)
tree5a363a16c8e0d975bbb859e49a4ef527492fedcc
parentf534f2b7dc10c412298816ddf9b78631b36f4afd (diff)
downloadmongo-65afd95ebe12305877f357227b99d231ffd85d39.tar.gz
Revert "SERVER-38252 Re-enable wt_repair_corrupt_metadata on Windows"
This reverts commit f534f2b7dc10c412298816ddf9b78631b36f4afd.
-rw-r--r--jstests/disk/wt_repair_corrupt_metadata.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/jstests/disk/wt_repair_corrupt_metadata.js b/jstests/disk/wt_repair_corrupt_metadata.js
index 6263b18825b..02fa8e37f79 100644
--- a/jstests/disk/wt_repair_corrupt_metadata.js
+++ b/jstests/disk/wt_repair_corrupt_metadata.js
@@ -6,6 +6,11 @@
(function() {
+ if (_isWindows()) {
+ jsTestLog("Skipping test on Windows");
+ return;
+ }
+
load('jstests/disk/libs/wt_file_helper.js');
const baseName = "wt_repair_corrupt_metadata";
@@ -77,15 +82,21 @@
// 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, true /* useBinaryMode */);
+ let data = cat(turtleFile);
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, true /* useBinaryMode */);
+ writeFile(turtleFile, newData);
assertRepairSucceeds(dbpath, mongod.port, mongodOptions);