From 29130d0c12bd8ba64e9ca7003e817e46a54d8c4e Mon Sep 17 00:00:00 2001 From: Eliot Horowitz Date: Wed, 19 May 2010 17:01:09 -0400 Subject: make client -> mongod connection static SERVER-956 --- jstests/sharding/shard2.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'jstests/sharding/shard2.js') diff --git a/jstests/sharding/shard2.js b/jstests/sharding/shard2.js index ea4ea95673c..11fa8bcde05 100644 --- a/jstests/sharding/shard2.js +++ b/jstests/sharding/shard2.js @@ -8,7 +8,7 @@ placeCheck = function( num ){ print("shard2 step: " + num ); } -s = new ShardingTest( "shard2" , 2 , 6 ); +s = new ShardingTest( "shard2" , 2 , 2 ); db = s.getDB( "test" ); @@ -26,7 +26,7 @@ db.foo.save( { num : 1 , name : "eliot" } ); db.foo.save( { num : 2 , name : "sara" } ); db.foo.save( { num : -1 , name : "joe" } ); -s.adminCommand( "connpoolsync" ); +db.getLastError(); assert.eq( 3 , s.getServer( "test" ).getDB( "test" ).foo.find().length() , "not right directly to db A" ); assert.eq( 3 , db.foo.find().length() , "not right on shard" ); @@ -59,18 +59,18 @@ placeCheck( 3 ); // test inserts go to right server/shard db.foo.save( { num : 3 , name : "bob" } ); -s.adminCommand( "connpoolsync" ); +db.getLastError(); assert.eq( 1 , primary.foo.find().length() , "after move insert go wrong place?" ); assert.eq( 3 , secondary.foo.find().length() , "after move insert go wrong place?" ); db.foo.save( { num : -2 , name : "funny man" } ); -s.adminCommand( "connpoolsync" ); +db.getLastError(); assert.eq( 2 , primary.foo.find().length() , "after move insert go wrong place?" ); assert.eq( 3 , secondary.foo.find().length() , "after move insert go wrong place?" ); db.foo.save( { num : 0 , name : "funny guy" } ); -s.adminCommand( "connpoolsync" ); +db.getLastError(); assert.eq( 2 , primary.foo.find().length() , "boundary A" ); assert.eq( 4 , secondary.foo.find().length() , "boundary B" ); -- cgit v1.2.1