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

create MongodTestFixture and make ConfigServerTestFixture extend it

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.14
    • Affects Version/s: None
    • Component/s: Sharding
    • Labels:
      None
    • Fully Compatible
    • Sharding 2016-08-29, Sharding 2016-09-19

      Goal:

      Be able to write unit tests that require both

      • network interface
      • storage engine

      but are shard-specific. Currently, at least the following projects require this:

      • All Nodes Shard Aware
      • Range Deleter
      • Remove DistLock from Split and Merge

      This is a band-aid before more comprehensive improvements in PM-595.

      ShardTestFixture should:

      • use NetworkInterfaceMock (for network interface)
      • extend ServiceContextMongoDTest (for storage engine)
      • have ClusterRole::ShardServer
      • have ShardingCatalogClientImpl
      • maybe have a real DistLockCatalog and DistLockManager**
      • have a real OpObserver

      ConfigServerTestFixture should additionally:

      • have ClusterRole::ConfigServer
      • have ShardingCatalogManagerImpl
      • have a mock network for addShard and executor for addShard
      • definitely have a real DistLockCatalog and DistLockManager**

      **The shard-specific unit tests may not actually use the DistLockCatalog and DistLockManager. Eventually, those classes should be owned by the ShardingCatalogManager, but currently they are accessed by the catalog manager through ShardingCatalogClient. Check if we can get away with just passing nullptr for the DistLockManager to the ShardingCatalogClient (if it's unused by tests), else must use DistLockCatalogImpl and ReplSetDistLockManager.

            Assignee:
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Reporter:
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: