summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog/create_collection_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/catalog/create_collection_test.cpp')
-rw-r--r--src/mongo/db/catalog/create_collection_test.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mongo/db/catalog/create_collection_test.cpp b/src/mongo/db/catalog/create_collection_test.cpp
index 7f16293665f..eae07bc5804 100644
--- a/src/mongo/db/catalog/create_collection_test.cpp
+++ b/src/mongo/db/catalog/create_collection_test.cpp
@@ -125,8 +125,7 @@ bool collectionExists(OperationContext* opCtx, const NamespaceString& nss) {
* Returns collection options.
*/
CollectionOptions getCollectionOptions(OperationContext* opCtx, const NamespaceString& nss) {
- AutoGetCollectionForRead autoColl(opCtx, nss);
- auto collection = autoColl.getCollection();
+ AutoGetCollectionForRead collection(opCtx, nss);
ASSERT_TRUE(collection) << "Unable to get collections options for " << nss
<< " because collection does not exist.";
return DurableCatalog::get(opCtx)->getCollectionOptions(opCtx, collection->getCatalogId());