summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Williams <louis.williams@mongodb.com>2020-06-17 11:09:28 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-06-17 21:11:00 +0000
commitc575ff0c457eed75fb8c472980aac6b7ceeb304f (patch)
treef6bf4e3bfdf2bca27ccfea2c98247454c3e4bad4
parentd71d29666e95a7dcbe145ca7e7ebaf74a1555563 (diff)
downloadmongo-c575ff0c457eed75fb8c472980aac6b7ceeb304f.tar.gz
SERVER-48919 dont_read_oplog_hole_on_step_up.js should wait until primary is writable
(cherry picked from commit 6947b03638c1c3ed0fe76c579c1b27725933cf09)
-rw-r--r--jstests/replsets/dont_read_oplog_hole_on_step_up.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/jstests/replsets/dont_read_oplog_hole_on_step_up.js b/jstests/replsets/dont_read_oplog_hole_on_step_up.js
index 76408727f50..4d42eb3c299 100644
--- a/jstests/replsets/dont_read_oplog_hole_on_step_up.js
+++ b/jstests/replsets/dont_read_oplog_hole_on_step_up.js
@@ -53,7 +53,9 @@ const planExecFP = configureFailPoint(newPrimary, "planExecutorHangWhileYieldedI
jsTestLog("Stepping up new primary");
assert.commandWorked(newPrimary.adminCommand({replSetStepUp: 1}));
-rst.awaitNodesAgreeOnPrimary(rst.kDefaultTimeoutMS, nodes, rst.getNodeId(newPrimary));
+
+// Wait for the node to transition to primary and accept writes.
+assert.eq(newPrimary, rst.getPrimary());
const createCollFP = configureFailPoint(newPrimary, "hangBeforeLoggingCreateCollection");
const createShell = startParallelShell(() => {