summaryrefslogtreecommitdiff
path: root/jstests/parallel
diff options
context:
space:
mode:
authoragirbal <antoine@10gen.com>2011-12-29 16:24:36 -0800
committeragirbal <antoine@10gen.com>2011-12-29 16:26:28 -0800
commit2eafe478d667bb2e68410c6709806efe60b0b713 (patch)
treebfbf36ca395dd5180e22cb6b1370800b87d5eca0 /jstests/parallel
parent009cc229ea0af766e632db87d5d6b45f7a60a275 (diff)
downloadmongo-2eafe478d667bb2e68410c6709806efe60b0b713.tar.gz
SERVER-4530: repl.js now uses correct host
Diffstat (limited to 'jstests/parallel')
-rw-r--r--jstests/parallel/repl.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/jstests/parallel/repl.js b/jstests/parallel/repl.js
index c296506da6c..8cc8dcdbb9f 100644
--- a/jstests/parallel/repl.js
+++ b/jstests/parallel/repl.js
@@ -7,14 +7,16 @@ rt = new ReplTest( baseName );
m = rt.start( true );
s = rt.start( false );
+// tests need to run against master server
db = m.getDB( "test" );
+host = db.getMongo().host;
Random.setRandomSeed();
t = new ParallelTester();
for( id = 0; id < 10; ++id ) {
- var g = new EventGenerator( id, baseName, Random.randInt( 20 ) );
+ var g = new EventGenerator( id, baseName, Random.randInt( 20 ), host );
for( var j = 0; j < 1000; ++j ) {
var op = Random.randInt( 3 );
switch( op ) {
@@ -34,7 +36,7 @@ for( id = 0; id < 10; ++id ) {
t.add( EventGenerator.dispatch, g.getEvents() );
}
-var g = new EventGenerator( id, baseName, Random.randInt( 5 ) );
+var g = new EventGenerator( id, baseName, Random.randInt( 5 ), host );
for( var j = 1000; j < 3000; ++j ) {
g.addCheckCount( j - 1000, { _id: {$gte:1000} }, j % 100 == 0, j % 500 == 0 );
g.addInsert( {_id:j} );