Skip to content

Commit

Permalink
SERVER-19886 Make tests run config servers with 3 member replica sets
Browse files Browse the repository at this point in the history
  • Loading branch information
renctan committed Aug 14, 2015
1 parent 9860212 commit 86eddcd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion buildscripts/resmokelib/testing/fixtures/shardedcluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def _new_configsvr(self):
mongod_executable=self.mongod_executable,
mongod_options=mongod_options,
preserve_dbpath=self.preserve_dbpath,
num_nodes=2,
num_nodes=3,
auth_options=self.auth_options,
replset_config_options={"configsvr": True})

Expand Down
4 changes: 3 additions & 1 deletion jstests/sharding/sharding_with_keyfile_auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ var st = new ShardingTest({ name : myTestName ,
var configs = st._configServers
var mongoses = st._mongos

mongoses[0].getDB( "admin" ).createUser({ user: "root", pwd: "pass", roles: ["root"] });
var createUserWC = st.configRS == null ? null : { w: st.configRS.numNodes };

mongoses[0].getDB("admin").createUser({ user: "root", pwd: "pass", roles: ["root"] }, createUserWC);

for( var i = 0; i < configs.length; i++ ){
var confAdmin = configs[i].getDB( "admin" );
Expand Down
7 changes: 1 addition & 6 deletions src/mongo/shell/shardingtest.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ ShardingTest = function( testName , numShards , verboseLevel , numMongos , other

// Check if testName is an object, if so, pull params from there
var keyFile = undefined
var numConfigs = 2;
var numConfigs = 3;
otherParams = Object.merge( otherParams || {}, {} )

if( isObject( testName ) ){
Expand Down Expand Up @@ -268,11 +268,6 @@ ShardingTest = function( testName , numShards , verboseLevel , numMongos , other
otherParams.sync = true;
}

if (numConfigs == 3) {
// TODO(spencer): Remove this once we support 3 node config server replica sets
otherParams.sync = true;
}

this._configServers = []
this._configServersAreRS = !otherParams.sync;

Expand Down

0 comments on commit 86eddcd

Please sign in to comment.