summaryrefslogtreecommitdiff
path: root/jstests/sharding/authCommands.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/sharding/authCommands.js')
-rw-r--r--jstests/sharding/authCommands.js10
1 files changed, 3 insertions, 7 deletions
diff --git a/jstests/sharding/authCommands.js b/jstests/sharding/authCommands.js
index e97a319d9f1..2349c4a7acb 100644
--- a/jstests/sharding/authCommands.js
+++ b/jstests/sharding/authCommands.js
@@ -69,7 +69,8 @@ testDB.getLastError( 'majority' );
assert.eq(1000, testDB.foo.count());
// Wait for the balancer to start back up
-st.startBalancer()
+assert.writeOK(configDB.settings.update({_id: 'balancer'}, {$set: {_waitForDelete: true}}, true));
+st.startBalancer();
// Make sure we've done at least some splitting, so the balancer will work
assert.gt( configDB.chunks.find({ ns : 'test.foo' }).count(), 2 )
@@ -81,12 +82,7 @@ assert.soon( function() {
return x < 2 && configDB.locks.findOne({ _id : 'test.foo' }).state == 0;
}, "no balance happened", 5 * 60 * 1000 );
-assert.soon( function(){
- print( "Waiting for migration cleanup to occur..." )
- return testDB.foo.find().itcount() == testDB.foo.count();
-})
-
-var map = function() { emit (this.i, this.j) };
+var map = function() { emit (this.i, this.j); };
var reduce = function( key, values ) {
var jCount = 0;
values.forEach( function(j) { jCount += j; } );