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

Make ReplSetTest port allocation consistent with other helpers

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: 2.6.0-rc0
    • Component/s: Testing Infrastructure
    • None
    • Fully Compatible

      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).

            Assignee:
            Unassigned Unassigned
            Reporter:
            sverch Shaun Verch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: