From 10b9987d9f2bf37ff76b3fd2271e1585c124d587 Mon Sep 17 00:00:00 2001 From: Daniel Gottlieb Date: Mon, 16 Mar 2020 15:08:25 -0400 Subject: SERVER-46641: Limit collection names to 255 characters. --- src/mongo/db/namespace_string_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mongo/db/namespace_string_test.cpp') diff --git a/src/mongo/db/namespace_string_test.cpp b/src/mongo/db/namespace_string_test.cpp index baba77e9855..b849284b99d 100644 --- a/src/mongo/db/namespace_string_test.cpp +++ b/src/mongo/db/namespace_string_test.cpp @@ -150,7 +150,7 @@ TEST(NamespaceStringTest, MakeDropPendingNamespace) { NamespaceString{"test.foo"}.makeDropPendingNamespace( repl::OpTime(Timestamp(Seconds(1234567), 8U), 9LL))); - std::string collName(8192, 't'); + std::string collName(NamespaceString::MaxNsCollectionLen, 't'); NamespaceString nss("test", collName); ASSERT_EQUALS(NamespaceString{"test.system.drop.1234567i8t9." + collName}, nss.makeDropPendingNamespace(repl::OpTime(Timestamp(Seconds(1234567), 8U), 9LL))); -- cgit v1.2.1