Skip to content

Commit abe98a5

Browse files
committed
add option to wait longer for ShardingTest.prototype.awaitBalance
1 parent 6e08bdc commit abe98a5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/mongo/shell/shardingtest.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,8 @@ ShardingTest.prototype.chunkDiff = function( collName , dbName ){
822822
// Waits up to one minute for the difference in chunks between the most loaded shard and least
823823
// loaded shard to be 0 or 1, indicating that the collection is well balanced.
824824
// This should only be called after creating a big enough chunk difference to trigger balancing.
825-
ShardingTest.prototype.awaitBalance = function( collName , dbName ) {
825+
ShardingTest.prototype.awaitBalance = function( collName , dbName , timeToWait ) {
826+
timeToWait = timeToWait || 60000;
826827
var shardingTest = this;
827828
assert.soon( function() {
828829
var x = shardingTest.chunkDiff( collName , dbName );

0 commit comments

Comments
 (0)