diff options
-rw-r--r-- | jstests/replsets/dont_read_oplog_hole_on_step_up.js | 4 |
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(() => { |