diff options
author | Aaron <aaron@10gen.com> | 2010-01-04 17:29:28 -0800 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2010-01-04 17:29:28 -0800 |
commit | 73dd7cb3ebe47a6a6e7b07236cc7dcd41c855382 (patch) | |
tree | b870e1534c88c15a945ffbe946eb71bd562e6808 /jstests/parallel | |
parent | e2bac039d1707ccd5ebc23e2d40b6f3713adf625 (diff) | |
download | mongo-73dd7cb3ebe47a6a6e7b07236cc7dcd41c855382.tar.gz |
SERVER-470 add randomization and other improvements to basic parallel test
Diffstat (limited to 'jstests/parallel')
-rw-r--r-- | jstests/parallel/basic.js | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/jstests/parallel/basic.js b/jstests/parallel/basic.js index 8140d826679..554cae00f30 100644 --- a/jstests/parallel/basic.js +++ b/jstests/parallel/basic.js @@ -2,10 +2,37 @@ var files = listFiles("jstests"); var i = 0; -var argvs = new Array( [{0:[]}], [{1:[]}], [{2:[]}], [{3:[]}] ); +var argvs = new Array( [{0:[]}], [{1:[]}], [{2:[]}], [{3:[]}], [{4:[]}] ); -// some tests can't run in parallel with others -var skipTests = { "jstests/dbadmin.js":1 }; +seed = new Date().getTime(); +print( "random seed: " + seed ); +srand( seed ); + +makeKeys = function( a ) { + var ret = {}; + for( var i in a ) { + ret[ a[ i ] ] = 1; + } + return ret; +} + +// some tests can't run in parallel with most others +var skipTests = makeKeys( [ "jstests/dbadmin.js", + "jstests/repair.js", + "jstests/cursor8.js", + "jstests/recstore.js", + "jstests/extent.js", + "jstests/indexb.js", + "jstests/profile1.js"] ); + +// some tests can't be run in parallel with each other +var serialTestsArr = [ "jstests/fsync.js", + "jstests/fsync2.js" ]; +var serialTests = makeKeys( serialTestsArr ); + +//argvs[ 4 ][ 0 ][ 0 ] = serialTestsArr; + +files = Array.shuffle( files ); files.forEach( function(x) { @@ -13,6 +40,7 @@ files.forEach( if ( /_runner/.test(x.name) || /_lodeRunner/.test(x.name) || ( x.name in skipTests ) || + ( x.name in serialTests ) || ! /\.js$/.test(x.name ) ){ print(" >>>>>>>>>>>>>>> skipping " + x.name); return; |