summaryrefslogtreecommitdiff
path: root/jstests/dur
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2013-09-25 21:59:42 -0400
committerBenety Goh <benety@mongodb.com>2013-10-29 13:11:41 -0400
commit2e10439eba106c1edd57522f6c549fccb245b1a0 (patch)
tree2425a68d08875802bdbdcafe8399260d2924ac83 /jstests/dur
parent1361ad0eacf7b924226d71aaab12e6f62e76e476 (diff)
downloadmongo-2e10439eba106c1edd57522f6c549fccb245b1a0.tar.gz
SERVER-9579 fixed dbpath prefix for all smoke tests that start (multiple) mongod processes through the mongo shell
Diffstat (limited to 'jstests/dur')
-rwxr-xr-xjstests/dur/a_quick.js4
-rw-r--r--jstests/dur/closeall.js4
-rw-r--r--jstests/dur/diskfull.js6
-rw-r--r--jstests/dur/dropdb.js4
-rwxr-xr-xjstests/dur/dur1.js4
-rwxr-xr-xjstests/dur/dur1_tool.js4
-rw-r--r--jstests/dur/dur2.js2
-rw-r--r--jstests/dur/dur_passthrough.js4
-rw-r--r--jstests/dur/indexbg.js2
-rw-r--r--jstests/dur/indexbg2.js2
-rwxr-xr-xjstests/dur/lsn.js44
-rwxr-xr-xjstests/dur/manyRestart.js4
-rw-r--r--jstests/dur/md5.js2
-rwxr-xr-xjstests/dur/oplog.js4
14 files changed, 45 insertions, 45 deletions
diff --git a/jstests/dur/a_quick.js b/jstests/dur/a_quick.js
index f703f3f35c5..cb8a2f2c57a 100755
--- a/jstests/dur/a_quick.js
+++ b/jstests/dur/a_quick.js
@@ -24,8 +24,8 @@ function checkNoJournalFiles(path, pass) {
}
// directories
-var path1 = "/data/db/quicknodur";
-var path2 = "/data/db/quickdur";
+var path1 = MongoRunner.dataDir + "/quicknodur";
+var path2 = MongoRunner.dataDir + "/quickdur";
// non-durable version
tst.log("start mongod without dur");
diff --git a/jstests/dur/closeall.js b/jstests/dur/closeall.js
index 540ef39f5ed..3d7119ab134 100644
--- a/jstests/dur/closeall.js
+++ b/jstests/dur/closeall.js
@@ -2,8 +2,8 @@
// this is also a test of recoverFromYield() as that will get exercised by the update
function f(variant, quickCommits, paranoid) {
- var path = "/data/db/closeall";
- var path2 = "/data/db/closeall_slave";
+ var path = MongoRunner.dataDir + "/closeall";
+ var path2 = MongoRunner.dataDir + "/closeall_slave";
var ourdb = "closealltest";
print("closeall.js start mongod variant:" + variant + "." + quickCommits + "." + paranoid);
diff --git a/jstests/dur/diskfull.js b/jstests/dur/diskfull.js
index db03ad2fce5..a1efba5595d 100644
--- a/jstests/dur/diskfull.js
+++ b/jstests/dur/diskfull.js
@@ -1,10 +1,10 @@
/** Test running out of disk space with durability enabled */
-startPath = "/data/db/diskfulltest";
-recoverPath = "/data/db/dur_diskfull";
+startPath = MongoRunner.dataDir + "/diskfulltest";
+recoverPath = MongoRunner.dataDir + "/dur_diskfull";
doIt = false;
-files = listFiles( "/data/db" );
+files = listFiles( MongoRunner.dataDir );
for ( i in files ) {
if ( files[ i ].name == startPath ) {
doIt = true;
diff --git a/jstests/dur/dropdb.js b/jstests/dur/dropdb.js
index 603755ef33b..4fb94cc7d1e 100644
--- a/jstests/dur/dropdb.js
+++ b/jstests/dur/dropdb.js
@@ -107,8 +107,8 @@ if (debugging) {
}
// directories
-var path1 = "/data/db/" + testname + "nodur";
-var path2 = "/data/db/" + testname + "dur";
+var path1 = MongoRunner.dataPath + testname + "nodur";
+var path2 = MongoRunner.dataPath + testname + "dur";
// non-durable version
log("mongod nodur");
diff --git a/jstests/dur/dur1.js b/jstests/dur/dur1.js
index 299ac3020ed..cb4495aea52 100755
--- a/jstests/dur/dur1.js
+++ b/jstests/dur/dur1.js
@@ -95,8 +95,8 @@ if( debugging ) {
log();
// directories
-var path1 = "/data/db/" + testname+"nodur";
-var path2 = "/data/db/" + testname+"dur";
+var path1 = MongoRunner.dataPath + testname+"nodur";
+var path2 = MongoRunner.dataPath + testname+"dur";
// non-durable version
log("run mongod without journaling");
diff --git a/jstests/dur/dur1_tool.js b/jstests/dur/dur1_tool.js
index 5090b5b2c72..fdfe05236f4 100755
--- a/jstests/dur/dur1_tool.js
+++ b/jstests/dur/dur1_tool.js
@@ -95,8 +95,8 @@ if( debugging ) {
log();
// directories
-var path1 = "/data/db/" + testname+"nodur";
-var path2 = "/data/db/" + testname+"dur";
+var path1 = MongoRunner.dataPath + testname+"nodur";
+var path2 = MongoRunner.dataPath + testname+"dur";
// non-durable version
log("run mongod without journaling");
diff --git a/jstests/dur/dur2.js b/jstests/dur/dur2.js
index 042e7e1d827..25cf8b1ccb2 100644
--- a/jstests/dur/dur2.js
+++ b/jstests/dur/dur2.js
@@ -65,7 +65,7 @@ if( debugging ) {
}
// directories
-var path = "/data/db/" + testname+"dur";
+var path = MongoRunner.dataPath + testname+"dur";
log("run mongod with --dur");
conn = startMongodEmpty("--port", 30001, "--dbpath", path, "--dur", "--smallfiles", "--durOptions", /*DurParanoid*/8, "--master", "--oplogSize", 64);
diff --git a/jstests/dur/dur_passthrough.js b/jstests/dur/dur_passthrough.js
index 994521203a5..f13d4b888bd 100644
--- a/jstests/dur/dur_passthrough.js
+++ b/jstests/dur/dur_passthrough.js
@@ -3,9 +3,9 @@
//
//TODO(mathias) add --master or make another test
-//conn = startMongodEmpty("--port", 30200, "--dbpath", "/data/db/dur_passthrough", "--dur", "--smallfiles", "--durOptions", "24");
+//conn = startMongodEmpty("--port", 30200, "--dbpath", MongoRunner.dataDir + "/dur_passthrough", "--dur", "--smallfiles", "--durOptions", "24");
-conn = startMongodEmpty("--port", 30200, "--dbpath", "/data/db/dur_passthrough", "--dur", "--nopreallocj", "--smallfiles",
+conn = startMongodEmpty("--port", 30200, "--dbpath", MongoRunner.dataDir + "/dur_passthrough", "--dur", "--nopreallocj", "--smallfiles",
"--durOptions", "8");
db = conn.getDB("test");
diff --git a/jstests/dur/indexbg.js b/jstests/dur/indexbg.js
index e78ae4a7202..71df92a41f6 100644
--- a/jstests/dur/indexbg.js
+++ b/jstests/dur/indexbg.js
@@ -1,4 +1,4 @@
-path = '/data/db/indexbg_dur';
+path = MongoRunner.dataDir + '/indexbg_dur';
m = startMongodEmpty( '--port', 30001, '--dbpath', path, '--journal', '--smallfiles', '--journalOptions', 24 );
t = m.getDB( 'test' ).test;
diff --git a/jstests/dur/indexbg2.js b/jstests/dur/indexbg2.js
index 6a0af247b44..a7484f0a561 100644
--- a/jstests/dur/indexbg2.js
+++ b/jstests/dur/indexbg2.js
@@ -1,4 +1,4 @@
-path = '/data/db/indexbg2_dur';
+path = MongoRunner.dataDir + '/indexbg2_dur';
m = startMongodEmpty( '--port', 30001, '--dbpath', path, '--journal', '--smallfiles' );
diff --git a/jstests/dur/lsn.js b/jstests/dur/lsn.js
index 505d8f5360c..93adf72b42e 100755
--- a/jstests/dur/lsn.js
+++ b/jstests/dur/lsn.js
@@ -72,33 +72,33 @@ if( debugging ) {
}
// directories
-var path2 = "/data/db/" + testname+"dur";
+var path2 = MongoRunner.dataPath + testname+"dur";
-// run mongod with a short --syncdelay to make LSN writing sooner
+// run mongod with a short --syncdelay to make LSN writing sooner
log("run mongod --dur and a short --syncdelay");
conn = startMongodEmpty("--syncdelay", 2, "--port", 30001, "--dbpath", path2, "--dur", "--smallfiles", "--durOptions", /*DurParanoid*/8, "--master", "--oplogSize", 64);
-work();
-
-log("wait a while for a sync and an lsn write");
-sleep(14); // wait for lsn write
-
-log("kill mongod -9");
+work();
+
+log("wait a while for a sync and an lsn write");
+sleep(14); // wait for lsn write
+
+log("kill mongod -9");
stopMongod(30001, /*signal*/9);
-// journal file should be present, and non-empty as we killed hard
-
-// check that there is an lsn file
-{
- var files = listFiles(path2 + "/journal/");
- assert(files.some(function (f) { return f.name.indexOf("lsn") >= 0; }),
- "lsn.js FAIL no lsn file found after kill, yet one is expected");
-}
-/*assert.soon(
- function () {
- var files = listFiles(path2 + "/journal/");
- return files.some(function (f) { return f.name.indexOf("lsn") >= 0; });
- },
- "lsn.js FAIL no lsn file found after kill, yet one is expected"
+// journal file should be present, and non-empty as we killed hard
+
+// check that there is an lsn file
+{
+ var files = listFiles(path2 + "/journal/");
+ assert(files.some(function (f) { return f.name.indexOf("lsn") >= 0; }),
+ "lsn.js FAIL no lsn file found after kill, yet one is expected");
+}
+/*assert.soon(
+ function () {
+ var files = listFiles(path2 + "/journal/");
+ return files.some(function (f) { return f.name.indexOf("lsn") >= 0; });
+ },
+ "lsn.js FAIL no lsn file found after kill, yet one is expected"
);*/
// restart and recover
diff --git a/jstests/dur/manyRestart.js b/jstests/dur/manyRestart.js
index 79f72a43bd1..f434278ca9a 100755
--- a/jstests/dur/manyRestart.js
+++ b/jstests/dur/manyRestart.js
@@ -107,8 +107,8 @@ if( debugging ) {
log();
// directories
-var path1 = "/data/db/" + testname+"nodur";
-var path2 = "/data/db/" + testname+"dur";
+var path1 = MongoRunner.dataPath + testname+"nodur";
+var path2 = MongoRunner.dataPath + testname+"dur";
// non-durable version
log("starting 30000");
diff --git a/jstests/dur/md5.js b/jstests/dur/md5.js
index 107476e9704..1773091186a 100644
--- a/jstests/dur/md5.js
+++ b/jstests/dur/md5.js
@@ -49,7 +49,7 @@ if( debugging ) {
log();
-var path = "/data/db/" + testname+"dur";
+var path = MongoRunner.dataPath + testname+"dur";
log();
conn = startMongodEmpty("--port", 30001, "--dbpath", path, "--dur", "--smallfiles", "--durOptions", 8);
diff --git a/jstests/dur/oplog.js b/jstests/dur/oplog.js
index 379c1b693fa..cd7d7c5e6ef 100755
--- a/jstests/dur/oplog.js
+++ b/jstests/dur/oplog.js
@@ -101,8 +101,8 @@ if( debugging ) {
log();
// directories
-var path1 = "/data/db/" + testname+"nodur";
-var path2 = "/data/db/" + testname+"dur";
+var path1 = MongoRunner.dataPath + testname+"nodur";
+var path2 = MongoRunner.dataPath + testname+"dur";
// non-durable version
log();