summaryrefslogtreecommitdiff
path: root/src/mongo/db/service_context_d_test_fixture.h
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2017-03-09 14:50:59 -0500
committerBenety Goh <benety@mongodb.com>2017-03-23 16:00:31 -0400
commitc1964e817459a575a64609229a473d57d08aa4d0 (patch)
tree83d079215cfc9010f99ef381e7a3c7d8b9b11db3 /src/mongo/db/service_context_d_test_fixture.h
parent41d56f108e341c88fe26632084d6140ea75813c0 (diff)
downloadmongo-c1964e817459a575a64609229a473d57d08aa4d0.tar.gz
SERVER-28204 added RollbackTest fixture
Diffstat (limited to 'src/mongo/db/service_context_d_test_fixture.h')
-rw-r--r--src/mongo/db/service_context_d_test_fixture.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mongo/db/service_context_d_test_fixture.h b/src/mongo/db/service_context_d_test_fixture.h
index 2442a10132a..402a1837724 100644
--- a/src/mongo/db/service_context_d_test_fixture.h
+++ b/src/mongo/db/service_context_d_test_fixture.h
@@ -39,7 +39,7 @@ class OperationContext;
* Test fixture class for tests that use either the "ephemeralForTest" or "devnull" storage engines.
*/
class ServiceContextMongoDTest : public unittest::Test {
-protected:
+public:
/**
* Initializes global storage engine.
*/
@@ -58,6 +58,16 @@ protected:
private:
/**
+ * Unused implementation of test function. This allows us to instantiate
+ * ServiceContextMongoDTest on its own without the need to inherit from it in a test.
+ * This supports using ServiceContextMongoDTest inside another test fixture and works around the
+ * limitation that tests cannot inherit from multiple test fixtures.
+ *
+ * It is an error to call this implementation of _doTest() directly.
+ */
+ void _doTest() override;
+
+ /**
* Drops all databases. Call this before global ReplicationCoordinator is destroyed -- it is
* used to drop the databases.
*/