diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-05-19 17:01:09 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-05-19 17:01:09 -0400 |
commit | 29130d0c12bd8ba64e9ca7003e817e46a54d8c4e (patch) | |
tree | 0ac46e3644df159630e084d585b6c46b57c5e921 /jstests/sharding/shard2.js | |
parent | f72751fd2efe21adca8ae2dcc1405a99ab3ded8d (diff) | |
download | mongo-29130d0c12bd8ba64e9ca7003e817e46a54d8c4e.tar.gz |
make client -> mongod connection static SERVER-956
Diffstat (limited to 'jstests/sharding/shard2.js')
-rw-r--r-- | jstests/sharding/shard2.js | 10 |
1 files changed, 5 insertions, 5 deletions
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" ); |