summaryrefslogtreecommitdiff
path: root/jstests/sharding/multi_mongos1.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/sharding/multi_mongos1.js')
-rw-r--r--jstests/sharding/multi_mongos1.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/jstests/sharding/multi_mongos1.js b/jstests/sharding/multi_mongos1.js
index fc7eaf1edfa..9778ff6059d 100644
--- a/jstests/sharding/multi_mongos1.js
+++ b/jstests/sharding/multi_mongos1.js
@@ -36,6 +36,8 @@ assert.eq( 1 , s1.onNumShards( "foo" ) , "on 1 shards" );
// where we try to issue a move chunk from a mongos that's stale
// followed by a split on a valid chunk, albeit one with not the highest lastmod
+s1.stopBalancer()
+
// split in [Minkey->1), [1->N), [N,Maxkey)
s1.adminCommand( { split : "test.foo" , middle : { num : 1 } } );
s1.adminCommand( { split : "test.foo" , middle : { num : N } } );
@@ -56,6 +58,8 @@ assert.eq( 1 , res.ok , "mongos did not reload after a failed migrate" + tojson(
res = s1.getDB( "admin" ).runCommand( { split : "test.foo" , middle : { num : N+1 } } ); // replace with { num: -1 } instead in 1.6
assert.eq( 1, res.ok , "split over accurate boudaries should have succeeded" + tojson(res) );
+s1.setBalancer( true )
+
// { num : 4 } is on primary
// { num : 1 , 2 , 3 } are on secondary
assert.eq( 1 , primary.find().toArray().length , "wrong count on primary" );