summaryrefslogtreecommitdiff
path: root/jstests/libs/parallelTester.js
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-11-25 11:20:43 -0500
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-12-08 13:05:00 -0500
commit3ed6635a5fb26c354046d275a1217c4526b2fe02 (patch)
treef40aa20b5e62996843ce3df0f47b82042dd683a7 /jstests/libs/parallelTester.js
parent4f24dc58f48cb087db8a4832421d298e9e2633a0 (diff)
downloadmongo-3ed6635a5fb26c354046d275a1217c4526b2fe02.tar.gz
SERVER-21050 Cleanup ReplSetTest
This is just a cleanup work to hide some of the private state of ReplSetTest so it is easier to encapsulate and add new logic. Also enables strict mode.
Diffstat (limited to 'jstests/libs/parallelTester.js')
-rw-r--r--jstests/libs/parallelTester.js12
1 files changed, 4 insertions, 8 deletions
diff --git a/jstests/libs/parallelTester.js b/jstests/libs/parallelTester.js
index bd948327310..cb5fb085a94 100644
--- a/jstests/libs/parallelTester.js
+++ b/jstests/libs/parallelTester.js
@@ -1,22 +1,18 @@
/**
* The ParallelTester class is used to test more than one test concurrently
*/
-
-
-if ( typeof _threadInject != "undefined" ){
- //print( "fork() available!" );
-
+if (typeof _threadInject != "undefined") {
Thread = function(){
this.init.apply( this, arguments );
}
_threadInject( Thread.prototype );
-
+
ScopedThread = function() {
this.init.apply( this, arguments );
}
ScopedThread.prototype = new Thread( function() {} );
_scopedThreadInject( ScopedThread.prototype );
-
+
fork = function() {
var t = new Thread( function() {} );
Thread.apply( t, arguments );
@@ -29,7 +25,7 @@ if ( typeof _threadInject != "undefined" ){
if (host == undefined) host = db.getMongo().host;
this.events = new Array( me, collectionName, host );
}
-
+
EventGenerator.prototype._add = function( action ) {
this.events.push( [ Random.genExp( this.mean ), action ] );
}