mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
SERVER-24881 Wait for the secondary to be able to win election in tests.
This commit is contained in:
parent
3ceb166dca
commit
130485fbfa
@ -44,8 +44,9 @@ load("jstests/replsets/rslib.js");
|
||||
assert.commandWorked(
|
||||
secondary.getDB('admin').runCommand({configureFailPoint: 'rsSyncApplyStop', mode: 'off'}));
|
||||
|
||||
// Wait for the secondary to catch up.
|
||||
assert.writeOK(primary.getDB("test").bar.insert({x: 3}, {writeConcern: {w: 2, j: true}}));
|
||||
// Step up the secondary and succeed.
|
||||
rst.awaitReplication();
|
||||
res = secondary.adminCommand({replSetStepUp: 1});
|
||||
assert.commandWorked(res);
|
||||
assert.eq(secondary, rst.getPrimary());
|
||||
|
Loading…
Reference in New Issue
Block a user