Browse files

SERVER-8786 Backport stability fixes to sharding/authConnectionHook.js

  • Loading branch information...
1 parent 5558c28 commit f1f70fbe0b515e7d868db0815cec822ae5515966 @stbrody stbrody committed Mar 26, 2013
Showing with 4 additions and 5 deletions.
  1. +4 −5 jstests/sharding/authConnectionHook.js
View
9 jstests/sharding/authConnectionHook.js
@@ -13,6 +13,7 @@ adminDB.auth('admin', 'password');
adminDB.runCommand({enableSharding : "test"});
adminDB.runCommand({shardCollection : "test.foo", key : {x : 1}});
+st.stopBalancer();
for (var i = 0; i < 100; i++) {
db.foo.insert({x:i});
@@ -22,14 +23,12 @@ adminDB.runCommand({split: "test.foo", middle: {x:50}});
var curShard = st.getShard("test.foo", {x:75});
var otherShard = st.getOther(curShard).name;
adminDB.runCommand({moveChunk: "test.foo", find: {x:25}, to: otherShard});
+assert.soon( function() { return !st.isAnyBalanceInFlight(); });
st.printShardingStatus();
-var savedOptions = st.shard0.savedOptions;
-printjson(savedOptions);
-savedOptions.restart = true;
-MongoRunner.stopMongod(st.shard0.port);
-MongoRunner.runMongod(savedOptions);
+MongoRunner.stopMongod(st.shard0);
+st.shard0 = MongoRunner.runMongod({restart : st.shard0});
// May fail the first couple times due to socket exceptions
assert.soon( function() {

0 comments on commit f1f70fb

Please sign in to comment.