diff options
author | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2015-07-29 18:02:37 -0400 |
---|---|---|
committer | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2015-09-23 14:50:56 -0400 |
commit | 2c1facf471cce8254e314755c3c7d2fbc753e5f4 (patch) | |
tree | 8e3f51519dd151cda6799dd52e6d0640c4a0ec05 /jstests/replsets/read_after_optime.js | |
parent | 75115dfaab9da2854b0fd892ce029781afea2731 (diff) | |
download | mongo-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.js | 8 |
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 } })); |