summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorVishnu Kaushik <vishnu.kaushik@mongodb.com>2021-06-04 20:48:41 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-08-11 02:06:17 +0000
commit3ad63191956190728ef36e10e8bb03e901c4ac35 (patch)
treef257dd843d21ab5042732013be8867dbfc3441b5 /jstests
parentf90d7a9b3e85930fe04376fab31dda639142bd5a (diff)
downloadmongo-3ad63191956190728ef36e10e8bb03e901c4ac35.tar.gz
SERVER-57465 remove_newly_added_field_after_finishing_initial_sync.js does not wait until the new configuration has been replicated
Diffstat (limited to 'jstests')
-rw-r--r--jstests/replsets/remove_newly_added_field_after_finishing_initial_sync.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/jstests/replsets/remove_newly_added_field_after_finishing_initial_sync.js b/jstests/replsets/remove_newly_added_field_after_finishing_initial_sync.js
index dde9d29f6e4..ef00ea58494 100644
--- a/jstests/replsets/remove_newly_added_field_after_finishing_initial_sync.js
+++ b/jstests/replsets/remove_newly_added_field_after_finishing_initial_sync.js
@@ -87,6 +87,9 @@ let res = primaryDb.runCommand(
assert.commandWorkedIgnoringWriteConcernErrors(res);
checkWriteConcernTimedOut(res);
+// Wait for the new config to be replicated before disconnecting the secondary.
+rst.waitForConfigReplication(primary);
+
// Only two nodes are needed for majority (0 and 1).
rst.nodes[2].disconnect(rst.nodes);
assert.commandWorked(primaryColl.insert({a: 3}, {writeConcern: {w: "majority"}}));