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

ShardingTest helper does not properly read configuration object in the "mongos" option

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Trivial - P5 Trivial - P5
    • None
    • 2.6.0-rc0
    • Testing Infrastructure
    • None
    • Fully Compatible
    • ALL
    • Hide

      This doesn't work:

      var clusterConfig = {shards : 1, mongos : { port: 40000 }, config : 1};
      var st = new ShardingTest(clusterConfig);
      assert.eq(40000, st.s.port);
      st.stop();

      This works:

      var clusterConfig = {shards : 1, mongos : [ { port: 40000 } ], config : 1};
      var st = new ShardingTest(clusterConfig);
      assert.eq(40000, st.s.port);
      st.stop();

      Show
      This doesn't work: var clusterConfig = {shards : 1, mongos : { port: 40000 }, config : 1}; var st = new ShardingTest(clusterConfig); assert.eq(40000, st.s.port); st.stop(); This works: var clusterConfig = {shards : 1, mongos : [ { port: 40000 } ], config : 1}; var st = new ShardingTest(clusterConfig); assert.eq(40000, st.s.port); st.stop();

    Description

      A config object passed in the "mongos" option of the ShardingTest config object get ignored by the helper, which is not how it's documented in the class or how the other helpers work. This can be circumvented by sticking the object in an array of one element.

      Attachments

        Activity

          People

            backlog-server-tig DO NOT USE - Backlog - Test Infrastructure Group (TIG)
            sverch Shaun Verch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: