diff options
author | Benety Goh <benety@mongodb.com> | 2021-06-10 16:20:16 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-06-10 21:04:36 +0000 |
commit | 16e34278c5bde6d33babc426d3d8ee3af068ee60 (patch) | |
tree | 09bfee4dac9951b4d8db3255d5f4faf22c310f4c | |
parent | 4b43aaaa4b4974322d6ed5f2e0883b6de3d384e3 (diff) | |
download | mongo-16e34278c5bde6d33babc426d3d8ee3af068ee60.tar.gz |
SERVER-57585 fix array indexes in oplog_visibility.js for assertion message
-rw-r--r-- | jstests/replsets/oplog_visibility.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/jstests/replsets/oplog_visibility.js b/jstests/replsets/oplog_visibility.js index 1ed7301637d..ee62e2475e8 100644 --- a/jstests/replsets/oplog_visibility.js +++ b/jstests/replsets/oplog_visibility.js @@ -88,10 +88,11 @@ for (let node of replTest.nodes) { oplogStart = timestamps[0]; let cursor = local.getCollection("oplog.rs").find({ts: {$gte: oplogStart}}).sort({$natural: 1}); - for (let observedTsIdx in timestamps) { + for (let observedTsIdx = 0; observedTsIdx < timestamps.length; ++observedTsIdx) { let observedTs = timestamps[observedTsIdx]; assert(cursor.hasNext()); - let actualTs = cursor.next()["ts"]; + let doc = cursor.next(); + let actualTs = doc["ts"]; assert.eq(actualTs, observedTs, function() { let prev = null; let next = null; |