summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/jstests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/dbtests/jstests.cpp')
-rw-r--r--src/mongo/dbtests/jstests.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/mongo/dbtests/jstests.cpp b/src/mongo/dbtests/jstests.cpp
index fe5c44fff0f..8569720e242 100644
--- a/src/mongo/dbtests/jstests.cpp
+++ b/src/mongo/dbtests/jstests.cpp
@@ -1002,9 +1002,9 @@ public:
string utf8ObjSpec = "{'_id':'\\u0001\\u007f\\u07ff\\uffff'}";
BSONObj utf8Obj = fromjson(utf8ObjSpec);
- const ServiceContext::UniqueOperationContext txnPtr = cc().makeOperationContext();
- OperationContext& txn = *txnPtr;
- DBDirectClient client(&txn);
+ const ServiceContext::UniqueOperationContext opCtxPtr = cc().makeOperationContext();
+ OperationContext& opCtx = *opCtxPtr;
+ DBDirectClient client(&opCtx);
client.insert(ns(), utf8Obj);
client.eval("unittest",
@@ -1023,9 +1023,9 @@ private:
}
void reset() {
- const ServiceContext::UniqueOperationContext txnPtr = cc().makeOperationContext();
- OperationContext& txn = *txnPtr;
- DBDirectClient client(&txn);
+ const ServiceContext::UniqueOperationContext opCtxPtr = cc().makeOperationContext();
+ OperationContext& opCtx = *opCtxPtr;
+ DBDirectClient client(&opCtx);
client.dropCollection(ns());
}
@@ -1047,9 +1047,9 @@ public:
if (!getGlobalScriptEngine()->utf8Ok())
return;
- const ServiceContext::UniqueOperationContext txnPtr = cc().makeOperationContext();
- OperationContext& txn = *txnPtr;
- DBDirectClient client(&txn);
+ const ServiceContext::UniqueOperationContext opCtxPtr = cc().makeOperationContext();
+ OperationContext& opCtx = *opCtxPtr;
+ DBDirectClient client(&opCtx);
client.eval("unittest",
"db.jstests.longutf8string.save( {_id:'\\uffff\\uffff\\uffff\\uffff'} )");
@@ -1057,9 +1057,9 @@ public:
private:
void reset() {
- const ServiceContext::UniqueOperationContext txnPtr = cc().makeOperationContext();
- OperationContext& txn = *txnPtr;
- DBDirectClient client(&txn);
+ const ServiceContext::UniqueOperationContext opCtxPtr = cc().makeOperationContext();
+ OperationContext& opCtx = *opCtxPtr;
+ DBDirectClient client(&opCtx);
client.dropCollection(ns());
}
@@ -1142,9 +1142,9 @@ public:
ServerGlobalParams::FeatureCompatibility::Version::k34);
// Drop the collection
- const ServiceContext::UniqueOperationContext txnPtr = cc().makeOperationContext();
- OperationContext& txn = *txnPtr;
- DBDirectClient client(&txn);
+ const ServiceContext::UniqueOperationContext opCtxPtr = cc().makeOperationContext();
+ OperationContext& opCtx = *opCtxPtr;
+ DBDirectClient client(&opCtx);
client.dropCollection("unittest.testroundtrip");
@@ -2251,9 +2251,9 @@ public:
update.appendCode("value",
"function () { db.test.find().forEach(function(obj) { continue; }); }");
- const ServiceContext::UniqueOperationContext txnPtr = cc().makeOperationContext();
- OperationContext& txn = *txnPtr;
- DBDirectClient client(&txn);
+ const ServiceContext::UniqueOperationContext opCtxPtr = cc().makeOperationContext();
+ OperationContext& opCtx = *opCtxPtr;
+ DBDirectClient client(&opCtx);
client.update("test.system.js", query.obj(), update.obj(), true /* upsert */);
unique_ptr<Scope> s(getGlobalScriptEngine()->newScope());