summaryrefslogtreecommitdiff
path: root/jstests/dur
diff options
context:
space:
mode:
authordwight <dwight@10gen.com>2011-01-25 11:53:03 -0500
committerdwight <dwight@10gen.com>2011-01-25 11:53:03 -0500
commitd6504a9936345c608b4f6ab43e2a641776f4183a (patch)
treecd8c429085b1a89c98d1bb97ebb618e2f97eb84c /jstests/dur
parent1059f85625c82045bd2c3370be4552db84d4c60c (diff)
downloadmongo-d6504a9936345c608b4f6ab43e2a641776f4183a.tar.gz
trying to make test fail more
Diffstat (limited to 'jstests/dur')
-rw-r--r--jstests/dur/closeall.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/jstests/dur/closeall.js b/jstests/dur/closeall.js
index c9a9008fdfd..f169f065826 100644
--- a/jstests/dur/closeall.js
+++ b/jstests/dur/closeall.js
@@ -2,11 +2,12 @@
// this is also a test of recoverFromYield() as that will get exercised by the update
function f() {
+ var variant = (new Date()) % 4;
var path = "/data/db/closeall";
var path2 = "/data/db/closeall_slave";
var ourdb = "closealltest";
- print("closeall.js start mongod");
+ print("closeall.js start mongod variant:" + variant);
var options = (new Date()-0)%2==0 ? 8 : 0;
print("closeall.js --durOptions " + options);
var N = 1000;
@@ -36,7 +37,13 @@ function f() {
if( i == 800 )
db1.foo.ensureIndex({ x: 1 });
var res = null;
- try {
+ try {
+ if( variant == 1 )
+ sleep(0);
+ else if( variant == 2 )
+ sleep(1);
+ else if( variant == 3 && i % 10 == 0 )
+ print(i);
res = db2.adminCommand("closeAllDatabases");
}
catch (e) {