summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/dbhelper_tests.cpp
diff options
context:
space:
mode:
authorTyler Brock <tyler.brock@gmail.com>2014-06-30 15:08:13 -0400
committerTyler Brock <tyler.brock@gmail.com>2014-06-30 15:08:13 -0400
commita353e16805d573af3d5ab4d32fbda87ec98d5c40 (patch)
treeb380194417fd18d7ac24a138cf8a3f14f2535e0c /src/mongo/dbtests/dbhelper_tests.cpp
parente9a6e9365cf4d6d13b4a3f94aec1f433dab9f704 (diff)
downloadmongo-a353e16805d573af3d5ab4d32fbda87ec98d5c40.tar.gz
Revert "SERVER-13961 Add OperationContext argument to Client::Context"
This reverts commit e1f5a39b1b625d04752be13f39c774e579b64cd8.
Diffstat (limited to 'src/mongo/dbtests/dbhelper_tests.cpp')
-rw-r--r--src/mongo/dbtests/dbhelper_tests.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/mongo/dbtests/dbhelper_tests.cpp b/src/mongo/dbtests/dbhelper_tests.cpp
index 88c04aece66..e0aeb507e36 100644
--- a/src/mongo/dbtests/dbhelper_tests.cpp
+++ b/src/mongo/dbtests/dbhelper_tests.cpp
@@ -61,7 +61,7 @@ namespace mongo {
{
// Remove _id range [_min, _max).
Lock::DBWrite lk(txn.lockState(), ns);
- Client::Context ctx(&txn, ns );
+ Client::Context ctx( ns );
KeyRange range( ns,
BSON( "_id" << _min ),
@@ -115,8 +115,9 @@ namespace mongo {
//
TEST(DBHelperTests, FindDiskLocs) {
+
+ DBDirectClient client;
OperationContextImpl txn;
- DBDirectClient client(&txn);
// Some unique tag we can use to make sure we're pulling back the right data
OID tag = OID::gen();
@@ -169,8 +170,9 @@ namespace mongo {
//
TEST(DBHelperTests, FindDiskLocsNoIndex) {
+
+ DBDirectClient client;
OperationContextImpl txn;
- DBDirectClient client(&txn);
client.remove( ns, BSONObj() );
client.insert( ns, BSON( "_id" << OID::gen() ) );
@@ -182,7 +184,7 @@ namespace mongo {
long long estSizeBytes;
{
Lock::DBRead lk(txn.lockState(), ns);
- Client::Context ctx(&txn, ns );
+ Client::Context ctx( ns );
// search invalid index range
KeyRange range( ns,
@@ -210,8 +212,9 @@ namespace mongo {
//
TEST(DBHelperTests, FindDiskLocsTooBig) {
+
+ DBDirectClient client;
OperationContextImpl txn;
- DBDirectClient client(&txn);
client.remove( ns, BSONObj() );
@@ -228,7 +231,7 @@ namespace mongo {
long long estSizeBytes;
{
Lock::DBRead lk(txn.lockState(), ns);
- Client::Context ctx(&txn, ns );
+ Client::Context ctx( ns );
KeyRange range( ns,
BSON( "_id" << 0 ),
BSON( "_id" << numDocsInserted ),