[CDRIVER-4497] Automatic Server Instance Test Fixture Management Created: 10/Oct/22  Updated: 13/Mar/23

Status: Backlog
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Unknown
Reporter: Colby Pike Assignee: Colby Pike
Resolution: Unresolved Votes: 0
Labels: QOL
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
clones CXX-2303 Automatic Server Instance Test Fixtur... Backlog

 Description   

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 )


Generated at Wed Feb 07 21:21:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.