diff options
author | Aaron <aaron@10gen.com> | 2010-01-05 15:13:43 -0800 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2010-01-05 15:13:43 -0800 |
commit | 5163695eca1f22cfde7d40968574dba21d97153f (patch) | |
tree | 53a19339b2b07ba05701f2b3f5c4283e475c308d /jstests/parallel/basicPlus.js | |
parent | b4230ff11ee0c4080b7e1846ad53f0f3acdf9221 (diff) | |
download | mongo-5163695eca1f22cfde7d40968574dba21d97153f.tar.gz |
SERVER-470 test to run basic js test in parallel with other tests
Diffstat (limited to 'jstests/parallel/basicPlus.js')
-rw-r--r-- | jstests/parallel/basicPlus.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/jstests/parallel/basicPlus.js b/jstests/parallel/basicPlus.js new file mode 100644 index 00000000000..ce5d793d4ee --- /dev/null +++ b/jstests/parallel/basicPlus.js @@ -0,0 +1,26 @@ +// perform basic js tests in parallel & some other tasks as well + +var c = db.jstests_parallel_basicPlus; +c.drop(); + +Random.setRandomSeed(); + +var params = ParallelTester.createJstestsLists( 4 ); +var t = new ParallelTester(); +for( i in params ) { + t.add( ParallelTester.fileTester, params[ i ] ); +} + +//for( var i = 4; i < 8; ++i ) { +// var g = new EventGenerator( i, "jstests_parallel_basicPlus", Random.randInt( 20 ) ); +// for( var j = ( i - 4 ) * 3000; j < ( i - 3 ) * 3000; ++j ) { +// var expected = j - ( ( i - 4 ) * 3000 ); +// g.addCheckCount( expected, {j:{$gte:(i-4)*3000,$lt:(i-3)*3000}}, expected % 1000 == 0, expected % 500 == 0 ); +// g.addInsert( {_id:j} ); +// } +// t.add( EventGenerator.dispatch, g.getEvents() ); +//} + +t.run( "one or more tests failed", true ); + +assert( c.validate().valid, "validate failed" );
\ No newline at end of file |