summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/pdfiletests.cpp
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2014-05-28 13:49:34 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2014-06-02 22:52:46 -0400
commit8c9fcc939f9f1a2b593e606bd790cc87efd4064f (patch)
treebeaa313f3e53cf72ca76aa5392946b97736ea6b3 /src/mongo/dbtests/pdfiletests.cpp
parent4add46aa8dd05a5c6d8af2c798eef6e9b5e4164b (diff)
downloadmongo-8c9fcc939f9f1a2b593e606bd790cc87efd4064f.tar.gz
SERVER-13961 Start using LockState from the OperationContext
Diffstat (limited to 'src/mongo/dbtests/pdfiletests.cpp')
-rw-r--r--src/mongo/dbtests/pdfiletests.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mongo/dbtests/pdfiletests.cpp b/src/mongo/dbtests/pdfiletests.cpp
index e62bce62067..effb9cb2359 100644
--- a/src/mongo/dbtests/pdfiletests.cpp
+++ b/src/mongo/dbtests/pdfiletests.cpp
@@ -48,13 +48,17 @@ namespace PdfileTests {
namespace Insert {
class Base {
public:
- Base() : _context( ns() ) {
+ Base() : _lk(_txn.lockState()),
+ _context(ns()) {
+
}
+
virtual ~Base() {
if ( !collection() )
return;
_context.db()->dropCollection( &_txn, ns() );
}
+
protected:
const char *ns() {
return "unittests.pdfiletests.Insert";
@@ -63,9 +67,10 @@ namespace PdfileTests {
return _context.db()->getCollection( &_txn, ns() );
}
- Lock::GlobalWrite lk_;
- Client::Context _context;
OperationContextImpl _txn;
+ Lock::GlobalWrite _lk;
+
+ Client::Context _context;
};
class InsertNoId : public Base {