summaryrefslogtreecommitdiff
path: root/jstests/replsets/read_after_optime.js
diff options
context:
space:
mode:
authorSiyuan Zhou <siyuan.zhou@mongodb.com>2015-07-29 18:02:37 -0400
committerSiyuan Zhou <siyuan.zhou@mongodb.com>2015-09-23 14:50:56 -0400
commit2c1facf471cce8254e314755c3c7d2fbc753e5f4 (patch)
tree8e3f51519dd151cda6799dd52e6d0640c4a0ec05 /jstests/replsets/read_after_optime.js
parent75115dfaab9da2854b0fd892ce029781afea2731 (diff)
downloadmongo-2c1facf471cce8254e314755c3c7d2fbc753e5f4.tar.gz
SERVER-18498 New replica set configurations have protocolVersion=1 by default
Diffstat (limited to 'jstests/replsets/read_after_optime.js')
-rw-r--r--jstests/replsets/read_after_optime.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/jstests/replsets/read_after_optime.js b/jstests/replsets/read_after_optime.js
index cb19940ee05..c73ab4574a8 100644
--- a/jstests/replsets/read_after_optime.js
+++ b/jstests/replsets/read_after_optime.js
@@ -14,15 +14,15 @@ var runTest = function(testDB, primaryConn) {
var localDB = primaryConn.getDB('local');
- var oplogTS = localDB.oplog.rs.find().sort({ $natural: -1 }).limit(1).next().ts;
- var twoSecTS = new Timestamp(oplogTS.getTime() + 2, 0);
+ var oplogTS = localDB.oplog.rs.find().sort({ $natural: -1 }).limit(1).next();
+ var twoSecTS = new Timestamp(oplogTS.ts.getTime() + 2, 0);
// Test timeout with maxTimeMS
var res = assert.commandFailed(testDB.runCommand({
find: 'user',
filter: { x: 1 },
readConcern: {
- afterOpTime: { ts: twoSecTS, t: 0 }
+ afterOpTime: { ts: twoSecTS, t: oplogTS.t }
},
maxTimeMS: 1000
}));
@@ -40,7 +40,7 @@ var runTest = function(testDB, primaryConn) {
find: 'user',
filter: { x: 1 },
readConcern: {
- afterOpTime: { ts: twoSecTS, t: 0 },
+ afterOpTime: { ts: twoSecTS, t: oplogTS.t },
maxTimeMS: 10 * 1000
}
}));