summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/storage_interface_impl_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/storage_interface_impl_test.cpp')
-rw-r--r--src/mongo/db/repl/storage_interface_impl_test.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/repl/storage_interface_impl_test.cpp b/src/mongo/db/repl/storage_interface_impl_test.cpp
index 218f925b97d..2ec1acfbdd6 100644
--- a/src/mongo/db/repl/storage_interface_impl_test.cpp
+++ b/src/mongo/db/repl/storage_interface_impl_test.cpp
@@ -580,9 +580,11 @@ TEST_F(StorageInterfaceImplWithReplCoordTest, DropCollectionWorksWithMissingColl
auto txn = getOperationContext();
StorageInterfaceImpl storage;
NamespaceString nss("foo.bar");
+ ASSERT_FALSE(AutoGetDb(txn, nss.db(), MODE_IS).getDb());
ASSERT_OK(storage.dropCollection(txn, nss));
- AutoGetCollectionForRead autoColl(txn, nss);
- ASSERT_FALSE(autoColl.getCollection());
+ ASSERT_FALSE(AutoGetCollectionForRead(txn, nss).getCollection());
+ // Database should not be created after running dropCollection.
+ ASSERT_FALSE(AutoGetDb(txn, nss.db(), MODE_IS).getDb());
}
TEST_F(StorageInterfaceImplWithReplCoordTest, FindOneReturnsInvalidNamespaceIfCollectionIsMissing) {