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

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

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: 2.6.0-rc0
    • Component/s: 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();
    • None
    • 0
    • None
    • None
    • None
    • None
    • None
    • None

      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.

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

              Created:
              Updated:
              Resolved: