|
After stopping the FSM and CRUD clients, this test should call ReplSetTest.awaitReplication() before querying the current primary with awaitNodesAgreeOnPrimary() and getPrimary():
jstests/noPassthrough/libs/backup_restore.js:360
|
backup_restore.js
|
354
|
// Wait up to 5 minutes until the new hidden node is in state SECONDARY.
|
355
|
rst.waitForState(hiddenNode, ReplSetTest.State.SECONDARY);
|
356
|
|
357
|
// Wait for secondaries to finish catching up before shutting down.
|
358
|
rst.awaitNodesAgreeOnPrimary();
|
359
|
primary = rst.getPrimary();
|
360
|
assert.writeOK(primary.getDB("test").foo.insert(
|
361
|
{}, {writeConcern: {w: rst.nodes.length, wtimeout: 10 * 60 * 1000}}));
|
362
|
|
363
|
// Stop set.
|
364
|
rst.stopSet();
|
365
|
|
|