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

Update some tests not to use getLastError unless they target legacy functionality

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • Query Execution 2021-05-31, Query Execution 2021-06-14

      We have many old tests that check success of a command-based operation by calling getLastError. We should update the test to use assert.commandWorked instead.

      This ticket deals with:

      jstests/auth/resource_pattern_matching.js
      jstests/core/dropdb_race.js
      jstests/multiVersion/genericSetFCVUsage/3_upgrade_replset.js
      jstests/multiVersion/migration_between_mixed_version_mongods.js
      jstests/multiVersion/minor_version_upgrade_replset.js
      jstests/noPassthrough/geo_full.js
      jstests/noPassthrough/indexbg1.js
      jstests/noPassthrough/update_server-5552.js
      jstests/sharding/read_pref_cmd.js
      jstests/sharding/rename.js

            Assignee:
            irina.yatsenko@mongodb.com Irina Yatsenko (Inactive)
            Reporter:
            irina.yatsenko@mongodb.com Irina Yatsenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: