mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
SERVER-48383 Wait for removed node to finish state transition in force_reconfig_skips_oplog_commitment.js
This commit is contained in:
parent
c90e5cbaab
commit
9c1c964657
@ -38,6 +38,14 @@ C1.members = C1.members.slice(0, 1); // Remove the second node.
|
||||
C1.version++;
|
||||
assert.commandWorked(primary.adminCommand({replSetReconfig: C1}));
|
||||
|
||||
// Make sure we can connect to the secondary after it was REMOVED.
|
||||
assert.soonNoExcept(function() {
|
||||
let res = secondary.adminCommand({replSetGetStatus: 1});
|
||||
assert.commandFailedWithCode(res, ErrorCodes.InvalidReplicaSetConfig);
|
||||
return true;
|
||||
}, () => tojson(secondary.adminCommand({replSetGetStatus: 1})));
|
||||
reconnect(secondary);
|
||||
|
||||
jsTestLog("Test that force reconfig skips oplog commitment.");
|
||||
let C2 = Object.assign({}, origConfig);
|
||||
|
||||
@ -53,8 +61,6 @@ const C3 = primary.getDB("local").system.replset.findOne();
|
||||
// Run another force reconfig to verify the pre-condition check is also skipped
|
||||
assert.commandWorked(primary.adminCommand({replSetReconfig: C3, force: true}));
|
||||
|
||||
// Make sure we can connect to the secondary after it was REMOVED.
|
||||
reconnect(secondary);
|
||||
restartServerReplication(secondary);
|
||||
rst.awaitNodesAgreeOnConfigVersion();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user