2016-03-09 18:17:50 +01:00
|
|
|
var rt = new ReplSetTest({name: "server_status_repl", nodes: 2});
|
2015-08-20 15:04:51 +02:00
|
|
|
rt.startSet();
|
|
|
|
rt.initiate();
|
|
|
|
|
|
|
|
rt.awaitSecondaryNodes();
|
|
|
|
|
|
|
|
var secondary = rt.getSecondary();
|
|
|
|
var primary = rt.getPrimary();
|
|
|
|
var testDB = primary.getDB("test");
|
|
|
|
|
|
|
|
assert.commandWorked(testDB.createCollection('a'));
|
2019-08-14 15:52:59 +02:00
|
|
|
assert.commandWorked(testDB.b.insert({}, {writeConcern: {w: 2}}));
|
2015-08-20 15:04:51 +02:00
|
|
|
|
2016-03-09 18:17:50 +01:00
|
|
|
var ss = primary.getDB("test").serverStatus({repl: 1});
|
2015-08-20 15:04:51 +02:00
|
|
|
assert.neq(ss.repl.replicationProgress, null, tojson(ss.repl));
|
|
|
|
|
|
|
|
rt.stopSet();
|