summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Nelson <lamont.nelson@mongodb.com>2019-10-24 19:24:53 +0000
committerevergreen <evergreen@mongodb.com>2019-10-24 19:24:53 +0000
commit1137e076c4315f531ef77d2e70ad11370cb3872c (patch)
tree1d9b13426a5248f53216391168330f206d2e033d
parent6344b4cdc185f2e3438f3f46f35de472820f66a6 (diff)
downloadmongo-1137e076c4315f531ef77d2e70ad11370cb3872c.tar.gz
SERVER-41781 Make one node in replica set non-voting to prevent non-deterministic election in the test.
-rw-r--r--jstests/sharding/sharding_multiple_ns_rs.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/jstests/sharding/sharding_multiple_ns_rs.js b/jstests/sharding/sharding_multiple_ns_rs.js
index 96584ab161d..d9b8b4c187f 100644
--- a/jstests/sharding/sharding_multiple_ns_rs.js
+++ b/jstests/sharding/sharding_multiple_ns_rs.js
@@ -9,7 +9,11 @@ TestData.skipCheckingUUIDsConsistentAcrossCluster = true;
load("jstests/replsets/rslib.js");
-var s = new ShardingTest({shards: 1, mongos: 1, other: {rs: true, chunkSize: 1}});
+var s = new ShardingTest({
+ shards: {rs0: {nodes: [{}, {}, {rsConfig: {priority: 0}}]}},
+ mongos: 1,
+ other: {rs: true, chunkSize: 1}
+});
assert.commandWorked(s.s0.adminCommand({enablesharding: "test"}));
assert.commandWorked(s.s0.adminCommand({shardcollection: "test.foo", key: {_id: 1}}));