diff options
author | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2019-06-23 15:23:36 -0400 |
---|---|---|
committer | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2019-06-24 20:20:56 -0400 |
commit | b4449789236d69805bad9511d15e288bebaa9d95 (patch) | |
tree | 7447cdacc4e1f4897bf0034261f3d9382023b191 /src/mongo/db/catalog/database_test.cpp | |
parent | b855e5562dbf2404a7857c110dbb39b451bf13f3 (diff) | |
download | mongo-b4449789236d69805bad9511d15e288bebaa9d95.tar.gz |
SERVER-41694 Remove the restriction on collection name length
Diffstat (limited to 'src/mongo/db/catalog/database_test.cpp')
-rw-r--r-- | src/mongo/db/catalog/database_test.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/mongo/db/catalog/database_test.cpp b/src/mongo/db/catalog/database_test.cpp index 981edc0aca4..53f58eb1cb5 100644 --- a/src/mongo/db/catalog/database_test.cpp +++ b/src/mongo/db/catalog/database_test.cpp @@ -393,18 +393,8 @@ TEST_F(DatabaseTest, ErrorCodes::FailedToParse, db->makeUniqueCollectionNamespace(_opCtx.get(), "CollectionModelWithoutPercentSign")); - // Generated namespace has to satisfy namespace length constraints so we will reject - // any collection model where the first substituted percent sign will not be in the - // generated namespace. See NamespaceString::MaxNsCollectionLen. - auto dbPrefix = _nss.db() + "."; - auto modelTooLong = - (StringBuilder() << dbPrefix - << std::string('x', - NamespaceString::MaxNsCollectionLen - dbPrefix.size()) - << "%") - .str(); - ASSERT_EQUALS(ErrorCodes::FailedToParse, - db->makeUniqueCollectionNamespace(_opCtx.get(), modelTooLong)); + std::string longCollModel(8192, '%'); + ASSERT_OK(db->makeUniqueCollectionNamespace(_opCtx.get(), StringData(longCollModel))); }); } |