summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog/collection_catalog_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/catalog/collection_catalog_test.cpp')
-rw-r--r--src/mongo/db/catalog/collection_catalog_test.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mongo/db/catalog/collection_catalog_test.cpp b/src/mongo/db/catalog/collection_catalog_test.cpp
index 3e5f1e906e9..5ac89ed76a8 100644
--- a/src/mongo/db/catalog/collection_catalog_test.cpp
+++ b/src/mongo/db/catalog/collection_catalog_test.cpp
@@ -655,7 +655,8 @@ TEST_F(CollectionCatalogTest, GetAllCollectionNamesAndGetAllDbNamesWithUncommitt
}
// One dbName with only an invisible collection does not appear in dbNames.
- auto invisibleCollA = catalog.lookupCollectionByNamespaceForMetadataWrite(&opCtx, aColl);
+ auto invisibleCollA = catalog.lookupCollectionByNamespaceForMetadataWrite(
+ &opCtx, CollectionCatalog::LifetimeMode::kInplace, aColl);
invisibleCollA->setCommitted(false);
auto res = catalog.getAllCollectionNamesFromDb(&opCtx, "dbA");
@@ -672,7 +673,8 @@ TEST_F(CollectionCatalogTest, GetAllCollectionNamesAndGetAllDbNamesWithUncommitt
std::vector<NamespaceString> dCollList = dbDNss;
dCollList.erase(std::find(dCollList.begin(), dCollList.end(), nss));
- auto invisibleCollD = catalog.lookupCollectionByNamespaceForMetadataWrite(&opCtx, nss);
+ auto invisibleCollD = catalog.lookupCollectionByNamespaceForMetadataWrite(
+ &opCtx, CollectionCatalog::LifetimeMode::kInplace, nss);
invisibleCollD->setCommitted(false);
res = catalog.getAllCollectionNamesFromDb(&opCtx, "dbD");
@@ -687,7 +689,8 @@ TEST_F(CollectionCatalogTest, GetAllCollectionNamesAndGetAllDbNamesWithUncommitt
// If all dbNames consist only of invisible collections, none of these dbs is visible.
for (auto& nss : nsss) {
- auto invisibleColl = catalog.lookupCollectionByNamespaceForMetadataWrite(&opCtx, nss);
+ auto invisibleColl = catalog.lookupCollectionByNamespaceForMetadataWrite(
+ &opCtx, CollectionCatalog::LifetimeMode::kInplace, nss);
invisibleColl->setCommitted(false);
}