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

Remove assert.commandFailed() and assert.throws()

    • Type: Icon: Engineering Test Engineering Test
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Service Arch

      As max.hirschhorn@mongodb.com said well, "assert.commandFailedWithCode() should always be preferred over assert.commandFailed() because it is possible to write the input parameters to a command incorrectly where it fails with BadValue/TypeMismatch/FailedToParse/etc. and means the test isn't exercising what it intended".

      assert.throws has the same problem and assert.throwsWithCode should be used instead.

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            judah.schvimer@mongodb.com Judah Schvimer
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: