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

CleanEveryN hook isn't compatible with ReplicaSetFixture and ShardedClusterFixture

    • Fully Compatible
    • ALL
    • QuInt B (11/02/15)

      ReplicaSetFixture.setup() creates and appends new MongoDFixture instances each time it gets called.

      ShardedClusterFixture.setup() creates and appends new MongodFixture instances for the shards each time it gets called.

      Instead, the fixtures used internally should only be constructed once, and then calls to setup() and teardown() will just to the right thing when restarting the ReplicaSetFixture and ShardedClusterFixture.

      Note that the port attribute is only set after MongoDFixture.setup() is called, which is why all of this initialization cannot happen in the constructor. Prior to SERVER-18273, this was useful to shrink the delay between when a port was acquire from OS and when it was handed off to the mongod process for use. However, now that resmoke.py assumes the availability of a contiguous range of ports, this technically isn't necessary, but also isn't a priority to change at present.

            Assignee:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: