summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXueruiFa <xuerui.fa@mongodb.com>2021-04-02 16:10:39 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-05-10 15:24:59 +0000
commit3076499da3152465085cebb3d6295be349ebdeed (patch)
tree4570aa0e18e4c51e110ca954eac0f575996d46ce
parent06447e6ff8e2cad7d5729d377c0cc2c6db8de898 (diff)
downloadmongo-3076499da3152465085cebb3d6295be349ebdeed.tar.gz
SERVER-55751: Increase election timeout in initial_sync_nodes_contribute_to_liveness_majority.js
(cherry picked from commit e306bd36283d0682842cf3fc2ddbc47363254a81)
-rw-r--r--jstests/replsets/initial_sync_nodes_contribute_to_liveness_majorities.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/jstests/replsets/initial_sync_nodes_contribute_to_liveness_majorities.js b/jstests/replsets/initial_sync_nodes_contribute_to_liveness_majorities.js
index b080de0cf86..d83c34fd88b 100644
--- a/jstests/replsets/initial_sync_nodes_contribute_to_liveness_majorities.js
+++ b/jstests/replsets/initial_sync_nodes_contribute_to_liveness_majorities.js
@@ -18,7 +18,7 @@ const name = jsTestName();
const rst = new ReplSetTest({
name,
nodes: [{}, {rsConfig: {priority: 0}}],
- settings: {electionTimeoutMillis: 1000, heartbeatIntervalMillis: 250},
+ settings: {electionTimeoutMillis: 3000, heartbeatIntervalMillis: 250},
useBridge: true
});
rst.startSet();
@@ -42,9 +42,9 @@ assert.commandWorked(initialSyncSecondary.adminCommand({
secondary.disconnect(primary);
// Verify that the primary should not step down due to not seeing a quorum. This is because the
-// primary should be receiving heartbeats from the initial sync node.
-assert.throws(() => checkLog.contains(
- primary, "can't see a majority of the set, relinquishing primary", 3000));
+// primary should be receiving heartbeats from the initial sync node. We specifically look for the
+// 'Can't see a majority of the set, relinquishing primary' log message.
+assert.throws(() => checkLog.containsJson(primary, 21809, {} /* attrs */, 3000));
assert.eq(primary, rst.getPrimary());