diff options
Diffstat (limited to 'jstests/sharding/shard3.js')
-rw-r--r-- | jstests/sharding/shard3.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/jstests/sharding/shard3.js b/jstests/sharding/shard3.js index fedf2ed72b8..abae4f19eb7 100644 --- a/jstests/sharding/shard3.js +++ b/jstests/sharding/shard3.js @@ -1,9 +1,9 @@ -// shard3.js +(function() { // Include helpers for analyzing explain output. load("jstests/libs/analyze_plan.js"); -s = new ShardingTest({name: "shard3", shards: 2, mongos: 2, other: {enableBalancer: true}}); +var s = new ShardingTest({name: "shard3", shards: 2, mongos: 2, other: { enableBalancer: true }}); s2 = s._mongos[1]; @@ -17,11 +17,11 @@ if (s.configRS) { } assert( sh.getBalancerState() , "A1" ) -sh.setBalancerState( false ) +sh.setBalancerState(false); assert( ! sh.getBalancerState() , "A2" ) -sh.setBalancerState( true ) +sh.setBalancerState(true); assert( sh.getBalancerState() , "A3" ) -sh.setBalancerState( false ) +sh.setBalancerState(false); assert( ! sh.getBalancerState() , "A4" ) s.config.databases.find().forEach( printjson ) @@ -173,3 +173,5 @@ y = dbb.foo.stats() printjson( y ) s.stop(); + +})(); |