diff options
author | Vishnu Kaushik <vishnu.kaushik@mongodb.com> | 2021-06-04 20:48:41 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-08-11 02:06:17 +0000 |
commit | 3ad63191956190728ef36e10e8bb03e901c4ac35 (patch) | |
tree | f257dd843d21ab5042732013be8867dbfc3441b5 /jstests | |
parent | f90d7a9b3e85930fe04376fab31dda639142bd5a (diff) | |
download | mongo-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.js | 3 |
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"}})); |