mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-25 09:19:32 +01:00
b377d97f8b
Otherwise, restarting a node will not use the correct options for when the node was originally brought up.
24 lines
691 B
JavaScript
24 lines
691 B
JavaScript
/**
|
|
* Tests that a node can be successfully restarted when the bridge is enabled.
|
|
* @tags: [requires_persistence, requires_replication]
|
|
*/
|
|
(function() {
|
|
"use strict";
|
|
|
|
const name = "restart_node_with_bridge";
|
|
const rst = new ReplSetTest({name: name, nodes: 1, useBridge: true});
|
|
rst.startSet();
|
|
rst.initiate();
|
|
rst.awaitNodesAgreeOnPrimary();
|
|
|
|
let primary = rst.getPrimary();
|
|
assert.commandWorked(primary.getDB("test").getCollection(name).insert({_id: 1}));
|
|
|
|
rst.restart(primary);
|
|
rst.awaitNodesAgreeOnPrimary();
|
|
primary = rst.getPrimary();
|
|
assert.eq(primary.getDB("test").getCollection(name).count({_id: 1}), 1);
|
|
|
|
rst.stopSet();
|
|
}());
|