diff options
Diffstat (limited to 'jstests/sharding/migrateBig.js')
| -rw-r--r-- | jstests/sharding/migrateBig.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/jstests/sharding/migrateBig.js b/jstests/sharding/migrateBig.js index 1613f17164b..c6b2ef28a97 100644 --- a/jstests/sharding/migrateBig.js +++ b/jstests/sharding/migrateBig.js @@ -1,6 +1,6 @@ s = new ShardingTest( "migrateBig" , 2 , 0 , 1 , { chunksize : 1 } ); - +s.config.settings.update( { _id: "balancer" }, { $set : { stopped: true } } , true ); s.adminCommand( { enablesharding : "test" } ); s.adminCommand( { shardcollection : "test.foo" , key : { x : 1 } } ); @@ -13,6 +13,7 @@ while ( big.length < 10000 ) for ( x=0; x<100; x++ ) coll.insert( { x : x , big : big } ) +db.getLastError(); s.adminCommand( { split : "test.foo" , middle : { x : 33 } } ) s.adminCommand( { split : "test.foo" , middle : { x : 66 } } ) @@ -48,6 +49,11 @@ for ( i=0; i<20; i+= 2 ) { db.printShardingStatus() + +s.config.settings.update( { _id: "balancer" }, { $set : { stopped: false } } , true ); + assert.soon( function(){ var x = s.chunkDiff( "foo" , "test" ); print( "chunk diff: " + x ); return x < 2; } , "no balance happened" , 8 * 60 * 1000 , 2000 ) +assert.eq( coll.count() , coll.find().itcount() ); + s.stop() |
