Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-42610

Flip order of assert.lte arguments in shards_and_config_return_last_committed_optime.js

    • Fully Compatible
    • ALL
    • v4.2
    • Sharding 2019-08-26
    • 12

      This check in shards_and_config_return_last_committed_optime.js is meant to succeed if the opTime in a command response is <= the last committed opTime returned from replSetGetStatus. The timestamps are compared using bsonWoCompare, which returns -1 if the first argument is smaller and 0 if the two arguments are equal. Currently the test uses assert.lte(0, <bsonWoCompare result>), which throws if 0 is not less than or equal to the result, so will incorrectly fail if the result is -1. The order of the arguments passed to assert.lte should be flipped.

            Assignee:
            jamie.heppenstall@mongodb.com James Heppenstall (Inactive)
            Reporter:
            jack.mulrow@mongodb.com Jack Mulrow
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: