diff options
Diffstat (limited to 'jstests/replsets/get_replication_info_helper.js')
-rw-r--r-- | jstests/replsets/get_replication_info_helper.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/jstests/replsets/get_replication_info_helper.js b/jstests/replsets/get_replication_info_helper.js index c031fb58779..cd6ef7d8a10 100644 --- a/jstests/replsets/get_replication_info_helper.js +++ b/jstests/replsets/get_replication_info_helper.js @@ -1,6 +1,6 @@ // Tests the output of db.getReplicationInfo() and tests db.printSlaveReplicationInfo(). -(function () { +(function() { "use strict"; var name = "getReplicationInfo"; var replSet = new ReplSetTest({name: name, nodes: 3, oplogSize: 50}); @@ -10,7 +10,7 @@ var primary = replSet.getPrimary(); for (var i = 0; i < 100; i++) { - primary.getDB('test').foo.insert({a:i}); + primary.getDB('test').foo.insert({a: i}); } replSet.awaitReplication(); @@ -28,8 +28,8 @@ // calling this function with and without a primary, should provide sufficient code coverage // to catch any JS errors - var mongo = startParallelShell("db.getSiblingDB('admin').printSlaveReplicationInfo();", - primary.port); + var mongo = + startParallelShell("db.getSiblingDB('admin').printSlaveReplicationInfo();", primary.port); mongo(); assert.soon(function() { return rawMongoProgramOutput().match("behind the primary"); @@ -42,11 +42,11 @@ } try { primary.getDB('admin').runCommand({replSetStepDown: 120, force: true}); + } catch (e) { } - catch (e) {} - mongo = startParallelShell("db.getSiblingDB('admin').printSlaveReplicationInfo();", - primary.port); + mongo = + startParallelShell("db.getSiblingDB('admin').printSlaveReplicationInfo();", primary.port); mongo(); assert.soon(function() { return rawMongoProgramOutput().match("behind the freshest"); |