diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2016-05-16 15:02:30 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2016-05-18 09:48:44 -0400 |
commit | 2a06469e1c07c3f9d1618495803c5c6260d21e86 (patch) | |
tree | 848ed2896d14c2c0c7cc035bc1e7b6845f13c2e7 /src/mongo/s/catalog/type_chunk_test.cpp | |
parent | 1290f33574da2e129bd3f5471dd06f2e761c74ee (diff) | |
download | mongo-2a06469e1c07c3f9d1618495803c5c6260d21e86.tar.gz |
SERVER-24167 ChunkType should generate the chunk's _id
This change removes the name field for the ChunkType metadata object in place of using the namespace and minKey directly.
Diffstat (limited to 'src/mongo/s/catalog/type_chunk_test.cpp')
-rw-r--r-- | src/mongo/s/catalog/type_chunk_test.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/mongo/s/catalog/type_chunk_test.cpp b/src/mongo/s/catalog/type_chunk_test.cpp index ffd357c1adc..cd4bbb4b1d4 100644 --- a/src/mongo/s/catalog/type_chunk_test.cpp +++ b/src/mongo/s/catalog/type_chunk_test.cpp @@ -53,14 +53,6 @@ TEST(ChunkType, MissingRequiredFields) { StatusWith<ChunkType> chunkRes = ChunkType::fromBSON(objModNS); ASSERT_FALSE(chunkRes.isOK()); - BSONObj objModName = - BSON(ChunkType::ns("test.mycol") << ChunkType::min(BSON("a" << 10 << "b" << 10)) - << ChunkType::max(BSON("a" << 20)) << "lastmod" - << Timestamp(chunkVersion.toLong()) << "lastmodEpoch" - << chunkVersion.epoch() << ChunkType::shard("shard0001")); - chunkRes = ChunkType::fromBSON(objModName); - ASSERT_FALSE(chunkRes.isOK()); - BSONObj objModKeys = BSON(ChunkType::name("test.mycol-a_MinKey") << ChunkType::ns("test.mycol") << "lastmod" << Timestamp(chunkVersion.toLong()) @@ -124,7 +116,6 @@ TEST(ChunkType, CorrectContents) { ASSERT_OK(chunkRes.getStatus()); ChunkType chunk = chunkRes.getValue(); - ASSERT_EQUALS(chunk.getName(), "test.mycol-a_MinKey"); ASSERT_EQUALS(chunk.getNS(), "test.mycol"); ASSERT_EQUALS(chunk.getMin(), BSON("a" << 10)); ASSERT_EQUALS(chunk.getMax(), BSON("a" << 20)); @@ -144,7 +135,6 @@ TEST(ChunkType, Pre22Format) { << "shard0001"))); ASSERT_OK(chunk.validate()); - ASSERT_EQUALS(chunk.getName(), "test.mycol-a_MinKey"); ASSERT_EQUALS(chunk.getNS(), "test.mycol"); ASSERT_EQUALS(chunk.getMin(), BSON("a" << 10)); ASSERT_EQUALS(chunk.getMax(), BSON("a" << 20)); |