diff options
Diffstat (limited to 'src/mongo/dbtests/matchertests.cpp')
-rw-r--r-- | src/mongo/dbtests/matchertests.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mongo/dbtests/matchertests.cpp b/src/mongo/dbtests/matchertests.cpp index 67bff7ef74b..cee3995395c 100644 --- a/src/mongo/dbtests/matchertests.cpp +++ b/src/mongo/dbtests/matchertests.cpp @@ -41,18 +41,19 @@ namespace MatcherTests { class CollectionBase { public: - CollectionBase() : - _ns( "unittests.matchertests" ) { + CollectionBase() : _ns( "unittests.matchertests" ) { + } + virtual ~CollectionBase() { - client().dropCollection( ns() ); + OperationContextImpl txn; + DBDirectClient client(&txn); + + client.dropCollection(_ns); } + protected: - const char* ns() const { return _ns; } - DBDirectClient &client() { return _client; } - private: const char * const _ns; - DBDirectClient _client; }; template <typename M> |