diff options
Diffstat (limited to 'src/mongo/dbtests/dbtests.cpp')
-rw-r--r-- | src/mongo/dbtests/dbtests.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/dbtests/dbtests.cpp b/src/mongo/dbtests/dbtests.cpp index 6f0b0f944db..1e90dfc482a 100644 --- a/src/mongo/dbtests/dbtests.cpp +++ b/src/mongo/dbtests/dbtests.cpp @@ -107,7 +107,7 @@ Status createIndexFromSpec(OperationContext* opCtx, StringData ns, const BSONObj coll = CollectionCatalog::get(opCtx)->lookupCollectionByNamespaceForMetadataWrite( opCtx, CollectionCatalog::LifetimeMode::kInplace, NamespaceString(ns)); if (!coll) { - auto db = autoDb.ensureDbExists(); + auto db = autoDb.ensureDbExists(opCtx); invariant(db); coll = db->createCollection(opCtx, NamespaceString(ns)); } @@ -165,7 +165,7 @@ WriteContextForTests::WriteContextForTests(OperationContext* opCtx, StringData n const bool doShardVersionCheck = false; _clientContext.emplace(opCtx, _nss.ns(), doShardVersionCheck); - auto db = _autoDb->ensureDbExists(); + auto db = _autoDb->ensureDbExistsopCtx); invariant(db, _nss.ns()); invariant(db == _clientContext->db()); |