diff options
Diffstat (limited to 'jstests/sharding/balancer_collection_status.js')
| -rw-r--r-- | jstests/sharding/balancer_collection_status.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/jstests/sharding/balancer_collection_status.js b/jstests/sharding/balancer_collection_status.js index 25622820605..e2bb502dc04 100644 --- a/jstests/sharding/balancer_collection_status.js +++ b/jstests/sharding/balancer_collection_status.js @@ -6,7 +6,6 @@ 'use strict'; const chunkSizeMB = 1; - let st = new ShardingTest({ shards: 3, other: { @@ -55,6 +54,10 @@ assert.eq(result.balancerCompliant, true); // get shardIds const shards = st.s0.getDB('config').shards.find().toArray(); +const bigString = 'X'.repeat(1024 * 1024); // 1MB +for (var i = 0; i < 30; i += 10) { + assert.commandWorked(st.s0.getDB('db').getCollection('col').insert({key: i, s: bigString})); +} // manually split and place the 3 chunks on the same shard assert.commandWorked(st.s0.adminCommand({split: 'db.col', middle: {key: 10}})); assert.commandWorked(st.s0.adminCommand({split: 'db.col', middle: {key: 20}})); |
