Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-8116

Fix issues related to inheritance in the cpp testing framework

    • Type: Icon: Technical Debt Technical Debt
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT10.0.1, 5.0.4, 5.2.0, 5.1.0-rc1, 4.4.11
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • 5
    • Storage - Ra 2021-10-18

      Issue 1:

      Our tests inherit from the base class test. We should define the destructor of the test class as virtual. The current implementation is not safeĀ and may result in memory leaks and undefined behaviors. We should make sure each base class has a virtual destructor.

      Issue 2:

      The current code generates a warning on MacOS:

        CXX      tests/run.o
      In file included from ../../../test/cppsuite/tests/run.cxx:38:
      ../../../test/cppsuite/tests/example_test.cxx:40:5: warning: 'run' overrides a member function but
            is not marked 'override' [-Winconsistent-missing-override]
      ../../../test/cppsuite/test_harness/test.h:72:18: note: overridden virtual function is here
          virtual void run();
      1 warning generated. 

      The keywords override final are missing in example_test.cxx.

      Definition of done:

      Address the issues described above, check all CPP tests are OK.

            monica.ng@mongodb.com Monica Ng
            etienne.petrel@mongodb.com Etienne Petrel
            Etienne Petrel, Jeremy Thorp
            0 Vote for this issue
            4 Start watching this issue