|
Test:
1. Start a sharding test with the balancer enabled.
2. Test that the balancer will move an unsharded collection associated with a zone when it is on the wrong shard.
- Create an unsharded collection on shard A.
- Add shard B to "zoneA".
- Add the zone to the unsharded collection using `updateZoneKeyRange`.
- Assert that the balancer eventually moves the collection to the to shard B.
3. Test that the balancer moves unsharded collections off a draining shard.
- Create two unsharded collections on shard A, one that is empty and one that is not, in the same DB.
- Remove the shard that these collections reside on.
- Assert that the balancer eventually moves the collection to shard B.
|