summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLingzhi Deng <lingzhi.deng@mongodb.com>2020-07-10 17:54:07 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-07-10 23:56:42 +0000
commit6653bf6dea2d03fa7075c56a19345804040440a9 (patch)
tree392175d568f27143fef7a592d4cb2b11db31b74d
parent461b2dee7d731d5a9cf5dd5000d73536bb534b56 (diff)
downloadmongo-6653bf6dea2d03fa7075c56a19345804040440a9.tar.gz
SERVER-49456: wait for newlyAdded fields removals before stepUp in dont_read_oplog_hole_on_step_up.js
-rw-r--r--jstests/replsets/dont_read_oplog_hole_on_step_up.js6
1 files changed, 5 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 84562213bbe..eff887799a1 100644
--- a/jstests/replsets/dont_read_oplog_hole_on_step_up.js
+++ b/jstests/replsets/dont_read_oplog_hole_on_step_up.js
@@ -41,6 +41,10 @@ assert.commandWorked(secondary.adminCommand({
}));
rst.reInitiate();
+// Wait for all 'newlyAdded' field removals to prevent auto reconfigs from interfering with the
+// replSetStepUp command below.
+rst.waitForAllNewlyAddedRemovals();
+
// Make sure when the original primary syncs, it's only from the secondary; this avoids spurious log
// messages.
assert.commandWorked(oldPrimary.adminCommand({
@@ -89,4 +93,4 @@ createShell();
rst.awaitReplication();
rst.stopSet();
-}()); \ No newline at end of file
+}());