jstests/sharding/libs/zone_changes_util.js
/**
 * Starts the balancer, lets it run for at least the given number of rounds,
 * then stops the balancer.
 */
Starts the balancer, lets it run for at least the given number of rounds,
then stops the balancer.
Starts the balancer lets it run for at least the given number of rounds then stops the balancer .
function runBalancer(st, minNumRounds) {
    st.startBalancer();
    for (let i = 0; i < minNumRounds + 1; ++i)
        st.awaitBalancerRound();
    st.stopBalancer();
}
function runBalancer ( st , minNumRounds ) { st . startBalancer ( ) ; for ( let i = 0 ; i < minNumRounds + 1 ; ++ i ) st . awaitBalancerRound ( ) ; st . stopBalancer ( ) ; }
Starts the balancer, lets it run for at least the given number of rounds,
 then stops the balancer.
Starts the balancer lets it run for at least the given number of rounds then stops the balancer .
// We add 1 to the number of rounds to avoid a race condition // where the first round is a no-op round