summaryrefslogtreecommitdiff
path: root/jstests/dur
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2011-01-19 18:03:16 -0500
committerMathias Stearn <mathias@10gen.com>2011-01-19 18:04:57 -0500
commit7c4988b4c49b3a2798c0d6229a6d70359d7447c4 (patch)
tree303414e07dc8ac2fe8007dc137efd1cde6cda174 /jstests/dur
parentc00ed72c02f09ee24223119401e70979aa2d6691 (diff)
downloadmongo-7c4988b4c49b3a2798c0d6229a6d70359d7447c4.tar.gz
Better behaving tests for when it takes a long time to commit
Diffstat (limited to 'jstests/dur')
-rwxr-xr-xjstests/dur/a_quick.js2
-rwxr-xr-xjstests/dur/dur1.js4
-rw-r--r--jstests/dur/md5.js4
-rwxr-xr-xjstests/dur/oplog.js4
4 files changed, 7 insertions, 7 deletions
diff --git a/jstests/dur/a_quick.js b/jstests/dur/a_quick.js
index 4d25711d80f..b5967b82d31 100755
--- a/jstests/dur/a_quick.js
+++ b/jstests/dur/a_quick.js
@@ -33,7 +33,7 @@ d.getLastError(); // wait
// as it will assure that commits happen on a timely basis. a bunch of the other dur/*js
// tests use fsync
tst.log("sleep a bit for a group commit");
-sleep(800);
+sleep(8000);
// kill the process hard
tst.log("kill -9 mongod");
diff --git a/jstests/dur/dur1.js b/jstests/dur/dur1.js
index 667807c765f..ef0642e897f 100755
--- a/jstests/dur/dur1.js
+++ b/jstests/dur/dur1.js
@@ -89,8 +89,8 @@ log();
conn = startMongodEmpty("--port", 30001, "--dbpath", path2, "--dur", "--smallfiles", "--durOptions", 8);
work();
-// wait for group commit. use getLastError(...) later when that is enhanced.
-sleep(400);
+// wait for group commit.
+printjson(conn.getDB('admin').runCommand({getlasterror:1, fsync:1}));
// kill the process hard
stopMongod(30001, /*signal*/9);
diff --git a/jstests/dur/md5.js b/jstests/dur/md5.js
index 795485e87ec..e58f26181ea 100644
--- a/jstests/dur/md5.js
+++ b/jstests/dur/md5.js
@@ -55,8 +55,8 @@ log();
conn = startMongodEmpty("--port", 30001, "--dbpath", path, "--dur", "--smallfiles", "--durOptions", 8);
work();
-// wait for group commit. use getLastError(...) later when that is enhanced.
-sleep(400);
+// wait for group commit.
+printjson(conn.getDB('admin').runCommand({getlasterror:1, fsync:1}));
// kill the process hard
stopMongod(30001, /*signal*/9);
diff --git a/jstests/dur/oplog.js b/jstests/dur/oplog.js
index b3f1460d9fc..cb2fa71f16e 100755
--- a/jstests/dur/oplog.js
+++ b/jstests/dur/oplog.js
@@ -99,8 +99,8 @@ log();
conn = startMongodEmpty("--port", 30001, "--dbpath", path2, "--dur", "--smallfiles", "--durOptions", /*DurParanoid*/8, "--master", "--oplogSize", 64);
work();
-// wait for group commit. use getLastError(...) later when that is enhanced.
-sleep(400);
+// wait for group commit.
+printjson(conn.getDB('admin').runCommand({getlasterror:1, fsync:1}));
// kill the process hard
stopMongod(30001, /*signal*/9);