summaryrefslogtreecommitdiff
path: root/jstests/dur
diff options
context:
space:
mode:
authorSpencer T Brody <spencer@mongodb.com>2015-04-15 14:19:44 -0400
committerSpencer T Brody <spencer@mongodb.com>2015-04-16 11:24:24 -0400
commita73f17f5fe6d5239433fd28cc972642151fd88b0 (patch)
tree411b1711a62bd802ba8006a826e25ebe53bde544 /jstests/dur
parent30a061c7f72f7b47029142bc641534eb8f0feed8 (diff)
downloadmongo-a73f17f5fe6d5239433fd28cc972642151fd88b0.tar.gz
SERVER-17450 Make dur tests use 'journal' instead of 'dur' so they can be run on duroff builders
Diffstat (limited to 'jstests/dur')
-rwxr-xr-xjstests/dur/a_quick.js10
-rw-r--r--jstests/dur/checksum.js12
-rw-r--r--jstests/dur/closeall.js10
-rw-r--r--jstests/dur/diskfull.js16
-rw-r--r--jstests/dur/dropdb.js11
-rw-r--r--jstests/dur/dur2.js8
-rw-r--r--jstests/dur/dur_jscore_passthrough.js2
-rwxr-xr-xjstests/dur/lsn.js10
-rwxr-xr-xjstests/dur/manyRestart.js25
-rwxr-xr-xjstests/dur/oplog.js10
10 files changed, 75 insertions, 39 deletions
diff --git a/jstests/dur/a_quick.js b/jstests/dur/a_quick.js
index 937b0b71bf4..9b527bbcf49 100755
--- a/jstests/dur/a_quick.js
+++ b/jstests/dur/a_quick.js
@@ -59,7 +59,7 @@ var path2 = MongoRunner.dataDir + "/quickdur";
// non-durable version
tst.log("start mongod without dur");
-var conn = MongoRunner.runMongod({dbpath: path1, nodur: ""});
+var conn = MongoRunner.runMongod({dbpath: path1, nojournal: ""});
tst.log("without dur work");
var d = conn.getDB("test");
assert.writeOK(d.foo.insert({ _id: 123 }));
@@ -68,7 +68,7 @@ MongoRunner.stopMongod(conn);
// durable version
tst.log("start mongod with dur");
-conn = MongoRunner.runMongod({dbpath: path2, dur: "", durOptions: 8});
+conn = MongoRunner.runMongod({dbpath: path2, journal: "", journalOptions: 8});
tst.log("with dur work");
d = conn.getDB("test");
assert.writeOK(d.foo.insert({ _id: 123 }));
@@ -104,7 +104,11 @@ if (files.some(function (f) { return f.name.indexOf("lsn") >= 0; })) {
// restart and recover
tst.log("restart and recover");
-conn = MongoRunner.runMongod({restart: true, cleanData: false, dbpath: path2, dur: "", durOptions: 9});
+conn = MongoRunner.runMongod({restart: true,
+ cleanData: false,
+ dbpath: path2,
+ journal: "",
+ journalOptions: 9});
tst.log("check data results");
d = conn.getDB("test");
diff --git a/jstests/dur/checksum.js b/jstests/dur/checksum.js
index ed4abf31147..2ee387261a8 100644
--- a/jstests/dur/checksum.js
+++ b/jstests/dur/checksum.js
@@ -6,7 +6,7 @@ var path = MongoRunner.dataPath + testname;
if (0) {
// This is used to create the prototype journal file.
jsTest.log("Just creating prototype journal, not testing anything");
- var conn = MongoRunner.runMongod({dbpath: path, dur: ""});
+ var conn = MongoRunner.runMongod({dbpath: path, journal: ""});
var db = conn.getDB("test");
// each insert is in it's own commit.
@@ -28,9 +28,9 @@ function startMongodWithJournal() {
return MongoRunner.runMongod({restart: true,
cleanData: false,
dbpath: path,
- dur: "",
+ journal: "",
smallfiles: "",
- durOptions: 1 /*DurDumpJournal*/});
+ journalOptions: 1 /*DurDumpJournal*/});
}
@@ -77,10 +77,10 @@ copyFile("jstests/libs/dur_checksum_good.journal", path + "/journal/j._1");
exitCode = runMongoProgram("mongod",
"--port", 30001,
"--dbpath", path,
- "--dur",
+ "--journal",
"--smallfiles",
- "--durOptions", 1 /*DurDumpJournal*/
- + 2 /*DurScanOnly*/);
+ "--journalOptions", 1 /*DurDumpJournal*/
+ + 2 /*DurScanOnly*/);
assert.eq(exitCode, 100 /*EXIT_UNCAUGHT*/);
diff --git a/jstests/dur/closeall.js b/jstests/dur/closeall.js
index 6dc301e9ae2..44ff1cb7c2b 100644
--- a/jstests/dur/closeall.js
+++ b/jstests/dur/closeall.js
@@ -6,18 +6,18 @@ function f(variant, quickCommits, paranoid) {
print("closeall.js start mongod variant:" + variant + "." + quickCommits + "." + paranoid);
var options = (paranoid==1 ? 8 : 0); // 8 is DurParanoid
- print("closeall.js --durOptions " + options);
+ print("closeall.js --journalOptions " + options);
var N = 1000;
if (options)
N = 300;
// use replication to exercise that code too with a close, and also to test local.sources with a close
- var conn = MongoRunner.runMongod({dur: "",
- durOptions: options + "",
+ var conn = MongoRunner.runMongod({journal: "",
+ journalOptions: options + "",
master: "",
oplogSize: 64});
- var connSlave = MongoRunner.runMongod({dur: "",
- durOptions: options + "",
+ var connSlave = MongoRunner.runMongod({journal: "",
+ journalOptions: options + "",
slave: "",
source: "localhost:" + conn.port});
diff --git a/jstests/dur/diskfull.js b/jstests/dur/diskfull.js
index 5d3b0da8906..85a6d5c1190 100644
--- a/jstests/dur/diskfull.js
+++ b/jstests/dur/diskfull.js
@@ -94,7 +94,13 @@ function runFirstMongodAndFillDisk() {
log();
clear();
- conn = MongoRunner.runMongod({restart: true, cleanData: false, dbpath: startPath, dur: "", smallfiles: "", durOptions: 8+64, noprealloc: ""});
+ conn = MongoRunner.runMongod({restart: true,
+ cleanData: false,
+ dbpath: startPath,
+ journal: "",
+ smallfiles: "",
+ journalOptions: 8+64,
+ noprealloc: ""});
assert.throws( work, null, "no exception thrown when exceeding disk capacity" );
MongoRunner.stopMongod(conn);
@@ -105,7 +111,13 @@ function runFirstMongodAndFillDisk() {
function runSecondMongdAndRecover() {
// restart and recover
log();
- conn = MongoRunner.runMongod({restart: true, cleanData: false, dbpath: startPath, dur: "", smallfiles: "", durOptions: 8+64, noprealloc: ""});
+ conn = MongoRunner.runMongod({restart: true,
+ cleanData: false,
+ dbpath: startPath,
+ journal: "",
+ smallfiles: "",
+ journalOptions: 8+64,
+ noprealloc: ""});
verify();
log("stop");
diff --git a/jstests/dur/dropdb.js b/jstests/dur/dropdb.js
index 4e0cc73f811..56a4a3608f1 100644
--- a/jstests/dur/dropdb.js
+++ b/jstests/dur/dropdb.js
@@ -110,14 +110,14 @@ var path2 = MongoRunner.dataPath + testname + "dur";
// non-durable version
log("mongod nodur");
-conn = MongoRunner.runMongod({dbpath: path1, nodur: "", smallfiles: ""});
+conn = MongoRunner.runMongod({dbpath: path1, nojournal: "", smallfiles: ""});
work();
verify();
MongoRunner.stopMongod(conn);
// durable version
log("mongod dur");
-conn = MongoRunner.runMongod({dbpath: path2, dur: "", smallfiles: "", durOptions: 8});
+conn = MongoRunner.runMongod({dbpath: path2, journal: "", smallfiles: "", journalOptions: 8});
work();
verify();
@@ -133,7 +133,12 @@ removeFile(path2 + "/test.0");
removeFile(path2 + "/lsn");
log("restart and recover");
-conn = MongoRunner.runMongod({restart: true, cleanData: false, dbpath: path2, dur: "", smallfiles: "", durOptions: 9});
+conn = MongoRunner.runMongod({restart: true,
+ cleanData: false,
+ dbpath: path2,
+ journal: "",
+ smallfiles: "",
+ journalOptions: 9});
log("verify after recovery");
verify();
diff --git a/jstests/dur/dur2.js b/jstests/dur/dur2.js
index 2748f69505e..1a412c2489d 100644
--- a/jstests/dur/dur2.js
+++ b/jstests/dur/dur2.js
@@ -69,9 +69,9 @@ var path = MongoRunner.dataPath + testname+"dur";
log("run mongod with --dur");
conn = MongoRunner.runMongod({dbpath: path,
- dur: "",
+ journal: "",
smallfiles: "",
- durOptions: 8 /*DurParanoid*/,
+ journalOptions: 8 /*DurParanoid*/,
master: "",
oplogSize: 64});
work();
@@ -87,9 +87,9 @@ log("restart mongod and recover");
conn = MongoRunner.runMongod({restart: true,
cleanData: false,
dbpath: path,
- dur: "",
+ journal: "",
smallfiles: "",
- durOptions: 8,
+ journalOptions: 8,
master: "",
oplogSize: 64});
verify();
diff --git a/jstests/dur/dur_jscore_passthrough.js b/jstests/dur/dur_jscore_passthrough.js
index c7e562f94d4..99a2ea7fb89 100644
--- a/jstests/dur/dur_jscore_passthrough.js
+++ b/jstests/dur/dur_jscore_passthrough.js
@@ -5,7 +5,7 @@
//TODO(mathias) add --master or make another test
//conn = startMongodEmpty("--port", 30200, "--dbpath", MongoRunner.dataDir + "/dur_passthrough", "--dur", "--smallfiles", "--durOptions", "24");
-var conn = MongoRunner.runMongod({dur: "", nopreallocj: "", smallfiles: "", durOptions: 8});
+var conn = MongoRunner.runMongod({journal: "", nopreallocj: "", smallfiles: "", journalOptions: 8});
db = conn.getDB("test");
conn.forceWriteMode("commands");
diff --git a/jstests/dur/lsn.js b/jstests/dur/lsn.js
index 347db279666..475263ce72a 100755
--- a/jstests/dur/lsn.js
+++ b/jstests/dur/lsn.js
@@ -75,12 +75,12 @@ if( debugging ) {
var path2 = MongoRunner.dataPath + testname+"dur";
// run mongod with a short --syncdelay to make LSN writing sooner
-log("run mongod --dur and a short --syncdelay");
+log("run mongod --journal and a short --syncdelay");
conn = MongoRunner.runMongod({dbpath: path2,
syncdelay: 2,
- dur: "",
+ journal: "",
smallfiles: "",
- durOptions: 8 /*DurParanoid*/,
+ journalOptions: 8 /*DurParanoid*/,
master: "",
oplogSize: 64});
work();
@@ -112,9 +112,9 @@ log("restart mongod, recover, verify");
conn = MongoRunner.runMongod({restart:true,
cleanData: false,
dbpath: path2,
- dur: "",
+ journal: "",
smallfiles: "",
- durOptions: 24,
+ journalOptions: 24,
master: "",
oplogSize: 64});
verify();
diff --git a/jstests/dur/manyRestart.js b/jstests/dur/manyRestart.js
index f30b068a79a..d2e864a708b 100755
--- a/jstests/dur/manyRestart.js
+++ b/jstests/dur/manyRestart.js
@@ -106,7 +106,7 @@ var path2 = MongoRunner.dataPath + testname+"dur";
// non-durable version
log("starting first mongod");
-conn = MongoRunner.runMongod({dbpath: path1, nodur: "", smallfiles: ""});
+conn = MongoRunner.runMongod({dbpath: path1, nojournal: "", smallfiles: ""});
work();
MongoRunner.stopMongod(conn);
@@ -115,7 +115,7 @@ MongoRunner.stopMongod(conn);
sleep(1000);
log("starting second mongod");
-conn = MongoRunner.runMongod({dbpath: path2, dur: "", smallfiles: "", durOptions: 8});
+conn = MongoRunner.runMongod({dbpath: path2, journal: "", smallfiles: "", journalOptions: 8});
work();
// wait for group commit.
printjson(conn.getDB('admin').runCommand({getlasterror:1, fsync:1}));
@@ -127,7 +127,12 @@ for (var i = 0; i < 3; ++i) {
// durable version
log("restarting second mongod");
- conn = MongoRunner.runMongod({restart: true, cleanData: false, dbpath: path2, dur: "", smallfiles: "", durOptions: 8});
+ conn = MongoRunner.runMongod({restart: true,
+ cleanData: false,
+ dbpath: path2,
+ journal: "",
+ smallfiles: "",
+ journalOptions: 8});
// wait for group commit.
printjson(conn.getDB('admin').runCommand({getlasterror:1, fsync:1}));
@@ -145,7 +150,12 @@ for (var i = 0; i < 3; ++i) {
// restart and recover
log("restart");
-conn = MongoRunner.runMongod({restart: true, cleanData: false, dbpath: path2, dur: "", smallfiles: "", durOptions: 8});
+conn = MongoRunner.runMongod({restart: true,
+ cleanData: false,
+ dbpath: path2,
+ journal: "",
+ smallfiles: "",
+ journalOptions: 8});
log("verify");
verify();
log("stop");
@@ -171,7 +181,12 @@ for (var i = 0; i < 5; ++i) {
// durable version
log("restarting second mongod");
- conn = MongoRunner.runMongod({restart: true, cleanData: false, dbpath: path2, dur: "", smallfiles: "", durOptions: 8});
+ conn = MongoRunner.runMongod({restart: true,
+ cleanData: false,
+ dbpath: path2,
+ journal: "",
+ smallfiles: "",
+ journalOptions: 8});
nrows += addRows();
// wait for group commit.
printjson(conn.getDB('admin').runCommand({getlasterror:1, fsync:1}));
diff --git a/jstests/dur/oplog.js b/jstests/dur/oplog.js
index d0829f66f8b..56cbac28d71 100755
--- a/jstests/dur/oplog.js
+++ b/jstests/dur/oplog.js
@@ -103,16 +103,16 @@ var path2 = MongoRunner.dataPath + testname+"dur";
// non-durable version
log();
-conn = MongoRunner.runMongod({dbpath: path1, nodur: "", smallfiles: "", master: "", oplogSize: 64});
+conn = MongoRunner.runMongod({dbpath: path1, nojournal: "", smallfiles: "", master: "", oplogSize: 64});
work();
MongoRunner.stopMongod(conn);
// durable version
log();
conn = MongoRunner.runMongod({dbpath: path2,
- dur: "",
+ journal: "",
smallfiles: "",
- durOptions: 8 /*DurParanoid*/,
+ journalOptions: 8 /*DurParanoid*/,
master: "",
oplogSize: 64});
work();
@@ -130,9 +130,9 @@ log();
conn = MongoRunner.runMongod({restart: true,
cleanData: false,
dbpath: path2,
- dur: "",
+ journal: "",
smallfiles: "",
- durOptions: 8,
+ journalOptions: 8,
master: "",
oplogSize: 64});
verify();