summaryrefslogtreecommitdiff
path: root/jstests/replsets/config1.js
blob: 748ce8ff59b23b1f5743d793760ea61470141b16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
doTest = function( signal ) {
    var name = 'config1';
  
    var replTest = new ReplSetTest( {name: name, nodes: 3} );
    var nodes = replTest.startSet();

    var config = replTest.getReplSetConfig();
    config.settings = {"heartbeatSleep" : .5, heartbeatTimeout : .8};
    
    replTest.initiate(config);

    // Call getMaster to return a reference to the node that's been
    // elected master.
    var master = replTest.getMaster();

    config = master.getDB("local").system.replset.findOne();
    assert.eq(config.settings.heartbeatSleep, .5);
    assert.eq(config.settings.heartbeatTimeout, .8);
};

doTest(15);