diff options
author | Benety Goh <benety@mongodb.com> | 2019-06-27 09:59:03 -0400 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2019-06-27 09:59:22 -0400 |
commit | a700238800aa2bf1e10c255337ec35373ffd2667 (patch) | |
tree | 0d19ffa0cbd8fbd5d84da0944b6d4113df924e22 /jstests/replsets | |
parent | a07912c7919d5cec360f628df445279800c66667 (diff) | |
download | mongo-a700238800aa2bf1e10c255337ec35373ffd2667.tar.gz |
SERVER-41847 replset1.js dumps oplog entries before checking createIndexes oplog entry
Diffstat (limited to 'jstests/replsets')
-rw-r--r-- | jstests/replsets/replset1.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/jstests/replsets/replset1.js b/jstests/replsets/replset1.js index 07494d88e10..6ba1edf2b71 100644 --- a/jstests/replsets/replset1.js +++ b/jstests/replsets/replset1.js @@ -122,7 +122,8 @@ var doTest = function(signal) { var result = db.runCommand({getLastError: 1, w: 3, wtimeout: 30000}); printjson(result); var lastOp = result.lastOp; - var lastOplogOp = master.getDB("local").oplog.rs.find().sort({$natural: -1}).limit(1).next(); + const oplogEntries = replTest.dumpOplog(master); + const lastOplogOp = oplogEntries[0]; assert.eq(lastOplogOp['ts'], lastOp['ts']); assert.eq(lastOplogOp['t'], lastOp['t']); |