From 06402114114ffc5146fd4b55402c96f1dc9ec4b5 Mon Sep 17 00:00:00 2001 From: Matthew Russotto Date: Fri, 17 Jul 2020 15:00:42 -0400 Subject: SERVER-49704 txn_being_applied_to_secondary_cannot_be_killed.js should not allow elections (cherry picked from commit b7b91adc3a0e5f6e70231fdbcebcf11554cc1cb6) --- jstests/sharding/txn_being_applied_to_secondary_cannot_be_killed.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jstests/sharding/txn_being_applied_to_secondary_cannot_be_killed.js b/jstests/sharding/txn_being_applied_to_secondary_cannot_be_killed.js index 2e5751cc738..47eba62f274 100644 --- a/jstests/sharding/txn_being_applied_to_secondary_cannot_be_killed.js +++ b/jstests/sharding/txn_being_applied_to_secondary_cannot_be_killed.js @@ -21,8 +21,9 @@ const ns = dbName + "." + collName; TestData.transactionLifetimeLimitSeconds = 10; const rsOpts = { - nodes: 3, - settings: {chainingAllowed: false} + // Make secondaries unelectable. + nodes: [{}, {rsConfig: {priority: 0}}, {rsConfig: {priority: 0}}], + settings: {chainingAllowed: false, electionTimeoutMillis: ReplSetTest.kForeverMillis} }; let st = new ShardingTest({mongos: 2, shards: {rs0: rsOpts, rs1: rsOpts, rs2: rsOpts}}); -- cgit v1.2.1