summaryrefslogtreecommitdiff
path: root/jstests/replsets/rollback_too_new.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/replsets/rollback_too_new.js')
-rw-r--r--jstests/replsets/rollback_too_new.js28
1 files changed, 16 insertions, 12 deletions
diff --git a/jstests/replsets/rollback_too_new.js b/jstests/replsets/rollback_too_new.js
index 8f2d43bc8d7..e0a88e12f31 100644
--- a/jstests/replsets/rollback_too_new.js
+++ b/jstests/replsets/rollback_too_new.js
@@ -14,27 +14,31 @@
var replTest = new ReplSetTest({name: name, nodes: 3});
var nodes = replTest.nodeList();
var conns = replTest.startSet();
- replTest.initiate({"_id": name,
- "members": [
- { "_id": 0, "host": nodes[0] },
- { "_id": 1, "host": nodes[1], arbiterOnly: true },
- { "_id": 2, "host": nodes[2], priority: 0 }],
- "settings": {
- "chainingAllowed": false
- }
- });
+ replTest.initiate({
+ "_id": name,
+ "members": [
+ {"_id": 0, "host": nodes[0]},
+ {"_id": 1, "host": nodes[1], arbiterOnly: true},
+ {"_id": 2, "host": nodes[2], priority: 0}
+ ],
+ "settings": {"chainingAllowed": false}
+ });
var c_conn = conns[2];
var CID = replTest.getNodeId(c_conn);
// get master and do an initial write
var master = replTest.getPrimary();
- var options = {writeConcern: {w: 2, wtimeout: 60000}};
+ var options = {
+ writeConcern: {w: 2, wtimeout: 60000}
+ };
assert.writeOK(master.getDB(name).foo.insert({x: 1}, options));
// add an oplog entry from the distant future as the most recent entry on node C
var future_oplog_entry = conns[2].getDB("local").oplog.rs.find().sort({$natural: -1})[0];
future_oplog_entry["ts"] = new Timestamp(future_oplog_entry["ts"].getTime() + 200000, 1);
- options = {writeConcern: {w: 1, wtimeout: 60000}};
+ options = {
+ writeConcern: {w: 1, wtimeout: 60000}
+ };
assert.writeOK(conns[2].getDB("local").oplog.rs.insert(future_oplog_entry, options));
replTest.stop(CID);
@@ -56,6 +60,6 @@
}
}, "node C failed to fassert", 60 * 1000);
- replTest.stopSet(undefined, undefined, { allowedExitCodes: [ MongoRunner.EXIT_ABRUPT ] });
+ replTest.stopSet(undefined, undefined, {allowedExitCodes: [MongoRunner.EXIT_ABRUPT]});
}());