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

MongoRunner jstest helpers do not support array of command line options

    XMLWordPrintable

    Details

    • Operating System:
      ALL

      Description

      The MongoRunner test helpers take a "configuration object" rather than an array, which means for example that you cannot test passing the same command line option twice.

      This line here, in the function that does the option conversion:
      https://github.com/mongodb/mongo/blob/r2.7.1/src/mongo/shell/servers.js#L280
      seems to be in place to test for the array case. However, we fall into the typical javascript trap where typeof an
      array is "object", so it doesn't work at all:
      https://github.com/mongodb/mongo/blob/r2.7.1/src/mongo/shell/types.js#L660

      We should either delete this code or fix "isObject" so that it returns the correct thing. As it is now, this is effectively dead and misleading code. As part of this we need to decide whether MongoRunner should support arrays for configuration or not.

        Attachments

          Activity

            People

            Assignee:
            backlog-server-stm Backlog - Server Tooling and Methods (STM)
            Reporter:
            sverch Shaun Verch
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: