From abf7cc678d081eb0fab1cec31a6f7c6dcafaac39 Mon Sep 17 00:00:00 2001 From: Aaron Date: Fri, 6 Feb 2009 13:26:29 -0500 Subject: [PATCH] Update unit tests --- dbtests/btreetests.cpp | 6 ++---- dbtests/namespacetests.cpp | 2 +- dbtests/pdfiletests.cpp | 3 ++- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/dbtests/btreetests.cpp b/dbtests/btreetests.cpp index 3266c338744..f2d7883ed54 100644 --- a/dbtests/btreetests.cpp +++ b/dbtests/btreetests.cpp @@ -28,10 +28,7 @@ namespace BtreeTests { class Base { public: Base() { - { - dblock lk; - setClient( ns() ); - } + setClient( ns() ); BSONObjBuilder builder; builder.append( "ns", ns() ); builder.append( "name", "testIndex" ); @@ -95,6 +92,7 @@ namespace BtreeTests { return idx_.keyPattern(); } private: + dblock lk_; IndexDetails idx_; }; diff --git a/dbtests/namespacetests.cpp b/dbtests/namespacetests.cpp index 0a24a807dff..bfb658165f4 100644 --- a/dbtests/namespacetests.cpp +++ b/dbtests/namespacetests.cpp @@ -30,7 +30,6 @@ namespace NamespaceTests { class Base { public: Base() { - dblock lk; setClient( ns() ); } ~Base() { @@ -96,6 +95,7 @@ namespace NamespaceTests { ASSERT( a.woCompare( b ) == 0 ); } private: + dblock lk_; IndexDetails id_; }; diff --git a/dbtests/pdfiletests.cpp b/dbtests/pdfiletests.cpp index dd05770b39a..dcc9787ab7f 100644 --- a/dbtests/pdfiletests.cpp +++ b/dbtests/pdfiletests.cpp @@ -31,7 +31,6 @@ namespace PdfileTests { class Base { public: Base() { - dblock lk; setClient( ns() ); } ~Base() { @@ -97,6 +96,8 @@ namespace PdfileTests { static NamespaceDetails *nsd() { return nsdetails( ns() ); } + private: + dblock lk_; }; class Empty : public Base {