[SERVER-13076] ShardingTest helper does not properly read configuration object in the "mongos" option Created: 06/Mar/14  Updated: 15/Dec/16  Resolved: 15/Dec/16

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: 2.6.0-rc0
Fix Version/s: None

Type: Bug Priority: Trivial - P5
Reporter: Shaun Verch Assignee: DO NOT USE - Backlog - Test Infrastructure Group (TIG)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

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();

Participants:

 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.


Generated at Thu Feb 08 03:30:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.