diff options
author | Randolph Tan <randolph@10gen.com> | 2013-11-26 11:19:05 -0500 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2013-11-26 11:19:05 -0500 |
commit | 86b4f30e0359f02777739cc15cdd6052cfdafeaa (patch) | |
tree | 5c59a029cfb3657197f61f005ccb3613e2760414 /jstests/dur | |
parent | 6015f1f2706201e52f66eede33ef41114dec5550 (diff) | |
download | mongo-86b4f30e0359f02777739cc15cdd6052cfdafeaa.tar.gz |
SERVER-11772 new jstest suites for write command testing
Added sharding and dur passthrough for jsCore
Diffstat (limited to 'jstests/dur')
-rw-r--r-- | jstests/dur/dur_jscore_passthrough.js | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/jstests/dur/dur_jscore_passthrough.js b/jstests/dur/dur_jscore_passthrough.js new file mode 100644 index 00000000000..d79b64ee14b --- /dev/null +++ b/jstests/dur/dur_jscore_passthrough.js @@ -0,0 +1,59 @@ +// +// simple runner to run toplevel tests in jstests +// + +//TODO(mathias) add --master or make another test +//conn = startMongodEmpty("--port", 30200, "--dbpath", MongoRunner.dataDir + "/dur_passthrough", "--dur", "--smallfiles", "--durOptions", "24"); + +conn = startMongodEmpty("--port", 30200, "--dbpath", MongoRunner.dataDir + "/dur_passthrough", "--dur", "--nopreallocj", "--smallfiles", +"--durOptions", "8"); +db = conn.getDB("test"); +conn._useWriteCommands = true; + +function doTest() { + var files = listFiles("jstests/core"); + files = files.sort(compareOn('name')); + + var runnerStart = new Date() + + files.forEach( + function (x) { + + if (/[\/\\]_/.test(x.name) || + !/\.js$/.test(x.name) || + /repair/.test(x.name) || // fails on recovery + /shellkillop/.test(x.name) || // takes forever and don't test anything new + false // placeholder so all real tests end in || + ) + { + print(" >>>>>>>>>>>>>>> skipping " + x.name); + return; + } + + print(); + print(" *******************************************"); + print(" Test : " + x.name + " ..."); + print(" " + Date.timeFunc(function () { load(x.name); }, 1) + "ms"); + gc(); // TODO SERVER-8683: remove gc() calls once resolved + } + ); + + stopMongod(30200); + + var runnerEnd = new Date() + + print( "total runner time: " + ( ( runnerEnd.getTime() - runnerStart.getTime() ) / 1000 ) + "secs" ) +} + +if (db.serverBuildInfo().bits == 64 && + db.serverBuildInfo().debug == false && + db.hostInfo().os.type == "Linux") +{ + doTest(); +} +else { + print("Skipping. Only run this test on non-debug, 64bit, Linux builds"); +} + +//TODO(mathias): test recovery here + |