summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/querytests.cpp
diff options
context:
space:
mode:
authorMaria van Keulen <maria@mongodb.com>2017-03-29 15:40:44 -0400
committerMaria van Keulen <maria@mongodb.com>2017-04-06 11:37:56 -0400
commit1cbb67b8acf6c579a8ef99f9b3bf74394bbd11c3 (patch)
tree426da6552cf3bb3315e46f925b0f3071e9979300 /src/mongo/dbtests/querytests.cpp
parent4516cbf1786f35557fe2f2e26e2e25373aa7af83 (diff)
downloadmongo-1cbb67b8acf6c579a8ef99f9b3bf74394bbd11c3.tar.gz
SERVER-28543 Add OperationContext as an argument to getCollection
Diffstat (limited to 'src/mongo/dbtests/querytests.cpp')
-rw-r--r--src/mongo/dbtests/querytests.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/dbtests/querytests.cpp b/src/mongo/dbtests/querytests.cpp
index e68d41bfcd8..9a756d054d2 100644
--- a/src/mongo/dbtests/querytests.cpp
+++ b/src/mongo/dbtests/querytests.cpp
@@ -64,7 +64,7 @@ public:
{
WriteUnitOfWork wunit(&_opCtx);
_database = _context.db();
- _collection = _database->getCollection(ns());
+ _collection = _database->getCollection(&_opCtx, ns());
if (_collection) {
_database->dropCollection(&_opCtx, ns());
}
@@ -191,7 +191,7 @@ public:
{
WriteUnitOfWork wunit(&_opCtx);
Database* db = ctx.db();
- if (db->getCollection(ns())) {
+ if (db->getCollection(&_opCtx, ns())) {
_collection = NULL;
db->dropCollection(&_opCtx, ns());
}
@@ -691,7 +691,7 @@ public:
long long cursorId = c->getCursorId();
auto pinnedCursor = unittest::assertGet(
- ctx.db()->getCollection(ns)->getCursorManager()->pinCursor(cursorId));
+ ctx.db()->getCollection(&_opCtx, ns)->getCursorManager()->pinCursor(cursorId));
ASSERT_EQUALS(three.toULL(), pinnedCursor.getCursor()->getSlaveReadTill().asULL());
}
};
@@ -1700,7 +1700,7 @@ public:
{
OldClientWriteContext ctx(&_opCtx, ns());
auto pinnedCursor = unittest::assertGet(
- ctx.db()->getCollection(ns())->getCursorManager()->pinCursor(cursorId));
+ ctx.db()->getCollection(&_opCtx, ns())->getCursorManager()->pinCursor(cursorId));
string expectedAssertion = str::stream() << "Cannot kill pinned cursor: " << cursorId;
ASSERT_THROWS_WHAT(CursorManager::eraseCursorGlobal(&_opCtx, cursorId),
MsgAssertionException,