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

Sharding jstests should not use assert.throws and assert.doesNotThrow to check if a parallel shell exited with an error

    XMLWordPrintableJSON

Details

    • Fully Compatible
    • Sharding 2020-06-15, Sharding 2020-06-29

    Description

      For example, a syntax error in the JavaScript being built up and handed to --eval would manifest the same way to this assert.throws().

      It's better to have the parallel shell itself assert whether it should have succeeded or failed, and to always have the parent mongo shell process assert the child process exits with code zero.

      Note that the moveChunkParallel() function already supports this with the `expectSuccess` parameter.

      Attachments

        Activity

          People

            luis.osta@mongodb.com Luis Osta (Inactive)
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: