diff options
author | Samy Lanka <samy.lanka@mongodb.com> | 2022-12-02 22:06:14 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-12-16 21:26:37 +0000 |
commit | f037f034bb407ab6fe61db4c95144dc4856cf0b0 (patch) | |
tree | e5f0952070be22933beb72d6f8d73bf69ee2e7f3 | |
parent | 4b44c240785b7763e0573df8db69b3a58b861769 (diff) | |
download | mongo-f037f034bb407ab6fe61db4c95144dc4856cf0b0.tar.gz |
SERVER-67213 Wait for all nodes to install config before doing a force reconfig in reconfig.js
(cherry picked from commit e5e5f384e92e3bd0a9d2f1bb4b92f86cb7c1b969)
-rw-r--r-- | jstests/replsets/reconfig.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/jstests/replsets/reconfig.js b/jstests/replsets/reconfig.js index ab9479cdb01..9260b91ce4f 100644 --- a/jstests/replsets/reconfig.js +++ b/jstests/replsets/reconfig.js @@ -5,6 +5,8 @@ (function() { "use strict"; +load("jstests/replsets/rslib.js"); + // Skip db hash check because secondary is left with a different config. TestData.skipCheckDBHashes = true; @@ -33,6 +35,10 @@ const lastOp = primaryOplog.find(expectedNoOp).sort({'$natural': -1}).limit(1).t assert(lastOp.length > 0); replTest.awaitReplication(); +// Make sure that all nodes have installed the config before moving on. +replTest.waitForConfigReplication(primary, nodes); +assert.soonNoExcept(() => isConfigCommitted(primary)); + jsTestLog("Invalid reconfig"); config.version++; var badMember = {_id: numNodes, host: "localhost:12345", priority: "High"}; |