Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-4497

Automatic Server Instance Test Fixture Management

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      Many test cases require an instance of a MongoDB server to run against, but the CMake build and test system is oblivious to this fact and thus tests will fail. Some test cases will require certain functionality to be toggled on the server instance as well.

      Catch2 can allow test fixtures via a constructor/destructor pair around a test case, but setting up a database on a per-test basis could be extremely wasteful. In CMake 3.7, CTest has a test fixtures feature which can be used to automatically set up and tear down test fixtures for other tests. These fixtures are loaded on a per-CTest-execution basis, so such fixtures could enable:

      1. Setup: Start a server instance with a scratch data path
      2. Execute all requested tests (possibly in parallel)
      3. Cleanup: Stop the server instance and delete the scratch data

      (Refer: https://cmake.org/cmake/help/latest/prop_test/FIXTURES_REQUIRED.html )

            Assignee:
            colby.pike@mongodb.com Colby Pike
            Reporter:
            colby.pike@mongodb.com Colby Pike
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: