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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: 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
    • 3
    • None
    • 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:
            DO NOT USE - Backlog - Test Infrastructure Group (TIG)
            Reporter:
            Shaun Verch (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: