diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2014-06-28 12:21:39 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2014-06-28 12:21:39 -0400 |
commit | 89fcbab94c7103105e8c72f654a5774a066bdb90 (patch) | |
tree | 5dccab74eaf78f104c8bbbbb869eed0374ecd02b /src/mongo/dbtests/directclienttests.cpp | |
parent | 52edab726185cbba1401cb46de221fb3d1cb0408 (diff) | |
download | mongo-89fcbab94c7103105e8c72f654a5774a066bdb90.tar.gz |
Revert "SERVER-13961 Add OperationContext argument to Client::Context"
This reverts commit 52edab726185cbba1401cb46de221fb3d1cb0408.
Diffstat (limited to 'src/mongo/dbtests/directclienttests.cpp')
-rw-r--r-- | src/mongo/dbtests/directclienttests.cpp | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/src/mongo/dbtests/directclienttests.cpp b/src/mongo/dbtests/directclienttests.cpp index 9c96dc331fd..0bea6ea2399 100644 --- a/src/mongo/dbtests/directclienttests.cpp +++ b/src/mongo/dbtests/directclienttests.cpp @@ -35,7 +35,6 @@ #include "mongo/db/instance.h" #include "mongo/db/json.h" #include "mongo/db/lasterror.h" -#include "mongo/db/operation_context_impl.h" #include "mongo/dbtests/dbtests.h" #include "mongo/util/timer.h" @@ -53,8 +52,7 @@ namespace DirectClientTests { class Capped : public ClientBase { public: virtual void run() { - OperationContextImpl txn; - DBDirectClient client(&txn); + DBDirectClient client; for( int pass=0; pass < 3; pass++ ) { client.createCollection(ns, 1024 * 1024, true, 999); for( int j =0; j < pass*3; j++ ) @@ -78,9 +76,7 @@ namespace DirectClientTests { class InsertMany : ClientBase { public: virtual void run(){ - OperationContextImpl txn; - DBDirectClient client(&txn); - + DBDirectClient client; vector<BSONObj> objs; objs.push_back(BSON("_id" << 1)); objs.push_back(BSON("_id" << 1)); @@ -103,9 +99,7 @@ namespace DirectClientTests { class BadNSCmd : ClientBase { public: virtual void run(){ - OperationContextImpl txn; - DBDirectClient client(&txn); - + DBDirectClient client; BSONObj result; BSONObj cmdObj = BSON( "count" << "" ); ASSERT_THROWS( client.runCommand( "", cmdObj, result ), UserException ); @@ -115,9 +109,7 @@ namespace DirectClientTests { class BadNSQuery : ClientBase { public: virtual void run(){ - OperationContextImpl txn; - DBDirectClient client(&txn); - + DBDirectClient client; auto_ptr<DBClientCursor> cursor = client.query( "", Query(), 1 ); ASSERT(cursor->more()); BSONObj result = cursor->next().getOwned(); @@ -129,9 +121,7 @@ namespace DirectClientTests { class BadNSGetMore : ClientBase { public: virtual void run(){ - OperationContextImpl txn; - DBDirectClient client(&txn); - + DBDirectClient client; auto_ptr<DBClientCursor> cursor = client.getMore("", 1, 1); ASSERT(cursor->more()); BSONObj result = cursor->next().getOwned(); @@ -143,9 +133,7 @@ namespace DirectClientTests { class BadNSInsert : ClientBase { public: virtual void run(){ - OperationContextImpl txn; - DBDirectClient client(&txn); - + DBDirectClient client; client.insert( "", BSONObj(), 0 ); ASSERT( !client.getLastError().empty() ); } @@ -154,9 +142,7 @@ namespace DirectClientTests { class BadNSUpdate : ClientBase { public: virtual void run(){ - OperationContextImpl txn; - DBDirectClient client(&txn); - + DBDirectClient client; client.update( "", Query(), BSON( "$set" << BSON( "x" << 1 )) ); ASSERT( !client.getLastError().empty() ); } @@ -165,9 +151,7 @@ namespace DirectClientTests { class BadNSRemove : ClientBase { public: virtual void run(){ - OperationContextImpl txn; - DBDirectClient client(&txn); - + DBDirectClient client; client.remove( "", Query() ); ASSERT( !client.getLastError().empty() ); } |