diff options
author | Greg Studer <greg@10gen.com> | 2012-01-26 11:53:13 -0500 |
---|---|---|
committer | Greg Studer <greg@10gen.com> | 2012-01-26 11:53:13 -0500 |
commit | 75b5ee69e55f94751d1cf6f31f4616c38a5abdfd (patch) | |
tree | a6380eb0ee4244d24bab6fa405a10ccd7b3d6feb /jstests/sharding/count1.js | |
parent | 292c647305b6c41cb8c96be1ff5d213c97579809 (diff) | |
download | mongo-75b5ee69e55f94751d1cf6f31f4616c38a5abdfd.tar.gz |
buildbot count1.js make sure we wait for stopped balancer, otherwise intermittent failures
Diffstat (limited to 'jstests/sharding/count1.js')
-rw-r--r-- | jstests/sharding/count1.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/jstests/sharding/count1.js b/jstests/sharding/count1.js index bc3dea4c794..2d133f887fc 100644 --- a/jstests/sharding/count1.js +++ b/jstests/sharding/count1.js @@ -3,7 +3,9 @@ s = new ShardingTest( "count1" , 2 , 1 ); db = s.getDB( "test" ); -sh.setBalancerState( false ); +// Stop balancer since doing manual stuff +// Make sure we totally stop here, otherwise balancing round can intermittently slip by +s.stopBalancer(); db.bar.save( { n : 1 } ) db.bar.save( { n : 2 } ) @@ -29,10 +31,6 @@ db.foo.save( { _id : 6 , name : "allan" } ) assert.eq( 6 , db.foo.find().count() , "basic count" ); -// Need to stop balancer if doing manual stuff -// Waits for balancer stop -s.stopBalancer() - s.adminCommand( { split : "test.foo" , find : { name : "joe" } } ); // [Minkey -> allan) , * [allan -> ..) s.adminCommand( { split : "test.foo" , find : { name : "joe" } } ); // * [allan -> sara) , [sara -> Maxkey) s.adminCommand( { split : "test.foo" , find : { name : "joe" } } ); // [alan -> joe) , [joe -> sara] |