0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 01:21:03 +01:00

SERVER-37274 Set priority of secondaries to zero in commands_that_accept_write_concern JS tests

This commit is contained in:
William Schultz 2018-10-01 12:34:53 -04:00
parent 1a8bd45b81
commit f4c69235c3
3 changed files with 24 additions and 5 deletions

View File

@ -8,7 +8,12 @@
(function() {
"use strict";
var replTest = new ReplSetTest({name: 'WCSet', nodes: 3, settings: {chainingAllowed: false}});
var replTest = new ReplSetTest({
name: 'WCSet',
// Set priority of secondaries to zero to prevent spurious elections.
nodes: [{}, {rsConfig: {priority: 0}}, {rsConfig: {priority: 0}}],
settings: {chainingAllowed: false}
});
replTest.startSet();
replTest.initiate();

View File

@ -21,9 +21,16 @@ load('jstests/multiVersion/libs/auth_helpers.js');
TestData.disableImplicitSessions = true;
var st = new ShardingTest({
// Set priority of secondaries to zero to prevent spurious elections.
shards: {
rs0: {nodes: 3, settings: {chainingAllowed: false}},
rs1: {nodes: 3, settings: {chainingAllowed: false}}
rs0: {
nodes: [{}, {rsConfig: {priority: 0}}, {rsConfig: {priority: 0}}],
settings: {chainingAllowed: false}
},
rs1: {
nodes: [{}, {rsConfig: {priority: 0}}, {rsConfig: {priority: 0}}],
settings: {chainingAllowed: false}
}
},
configReplSetTestOptions: {settings: {chainingAllowed: false}},
mongos: 1

View File

@ -14,9 +14,16 @@ load('jstests/libs/write_concern_util.js');
(function() {
"use strict";
var st = new ShardingTest({
// Set priority of secondaries to zero to prevent spurious elections.
shards: {
rs0: {nodes: 3, settings: {chainingAllowed: false}},
rs1: {nodes: 3, settings: {chainingAllowed: false}}
rs0: {
nodes: [{}, {rsConfig: {priority: 0}}, {rsConfig: {priority: 0}}],
settings: {chainingAllowed: false}
},
rs1: {
nodes: [{}, {rsConfig: {priority: 0}}, {rsConfig: {priority: 0}}],
settings: {chainingAllowed: false}
}
},
configReplSetTestOptions: {settings: {chainingAllowed: false}},
mongos: 1,