[SERVER-13077] Make ReplSetTest port allocation consistent with other helpers Created: 06/Mar/14  Updated: 16/Sep/15  Resolved: 16/Sep/15

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

Type: Improvement Priority: Trivial - P5
Reporter: Shaun Verch Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-18268 Support running sharding and replicat... Closed
Related
related to SERVER-13112 Cannot use more than one ShardingTest... Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

There are two different functions used to allocate ports in jstests:
https://github.com/mongodb/mongo/blob/r2.6.0-rc0/src/mongo/shell/servers.js#L218
https://github.com/mongodb/mongo/blob/r2.6.0-rc0/src/mongo/shell/servers_misc.js#L236

One of them actually keeps track of what ports have been used and allocates the next one, but the other does not and just allocates a block that you request without any checks.

The "ReplSetTest" helper uses the one that does not do any checks, which means that two "ReplSetTest" helpers cannot be used simultaneously without allocating and setting ports manually. The other helpers don't have this problem (except for ShardingTest which uses a ReplSetTest object when the shards are replica sets).



 Comments   
Comment by Kamran K. [ 16/Sep/15 ]

This was addressed by the changes for SERVER-18268.

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