diff options
Diffstat (limited to 'src/mongo/shell/utils_sh.js')
-rw-r--r-- | src/mongo/shell/utils_sh.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/shell/utils_sh.js b/src/mongo/shell/utils_sh.js index a64292a6004..e086bbf8f46 100644 --- a/src/mongo/shell/utils_sh.js +++ b/src/mongo/shell/utils_sh.js @@ -351,6 +351,12 @@ sh.awaitCollectionBalance = function(coll, timeout, interval) { }, 'Timed out waiting for orphans counter to be 0', timeout, interval); sh.enableBalancing(coll); + // (SERVER-70602) Wait for some balancing rounds to avoid balancerCollectionStatus + // reporting balancerCompliant too early + for (let i = 0; i < 3; ++i) { + sh.awaitBalancerRound(timeout, interval); + } + return assert.commandWorked(sh._adminCommand({balancerCollectionStatus: ns}, true)) .balancerCompliant; }, |