summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/config/sharding_catalog_manager_clear_jumbo_flag_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/s/config/sharding_catalog_manager_clear_jumbo_flag_test.cpp')
-rw-r--r--src/mongo/db/s/config/sharding_catalog_manager_clear_jumbo_flag_test.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/mongo/db/s/config/sharding_catalog_manager_clear_jumbo_flag_test.cpp b/src/mongo/db/s/config/sharding_catalog_manager_clear_jumbo_flag_test.cpp
index bd428f52954..68845265eae 100644
--- a/src/mongo/db/s/config/sharding_catalog_manager_clear_jumbo_flag_test.cpp
+++ b/src/mongo/db/s/config/sharding_catalog_manager_clear_jumbo_flag_test.cpp
@@ -100,21 +100,29 @@ private:
};
TEST_F(ClearJumboFlagTest, ClearJumboShouldBumpVersion) {
+ const auto collEpoch = epoch();
+ const auto collTimestamp = boost::none;
+
ShardingCatalogManager::get(operationContext())
- ->clearJumboFlag(operationContext(), ns(), epoch(), jumboChunk());
+ ->clearJumboFlag(operationContext(), ns(), collEpoch, jumboChunk());
- auto chunkDoc = uassertStatusOK(getChunkDoc(operationContext(), jumboChunk().getMin()));
+ auto chunkDoc = uassertStatusOK(
+ getChunkDoc(operationContext(), jumboChunk().getMin(), collEpoch, collTimestamp));
ASSERT_FALSE(chunkDoc.getJumbo());
- ASSERT_EQ(ChunkVersion(15, 0, epoch(), boost::none /* timestamp */), chunkDoc.getVersion());
+ ASSERT_EQ(ChunkVersion(15, 0, collEpoch, collTimestamp), chunkDoc.getVersion());
}
TEST_F(ClearJumboFlagTest, ClearJumboShouldNotBumpVersionIfChunkNotJumbo) {
+ const auto collEpoch = epoch();
+ const auto collTimestamp = boost::none;
+
ShardingCatalogManager::get(operationContext())
- ->clearJumboFlag(operationContext(), ns(), epoch(), nonJumboChunk());
+ ->clearJumboFlag(operationContext(), ns(), collEpoch, nonJumboChunk());
- auto chunkDoc = uassertStatusOK(getChunkDoc(operationContext(), nonJumboChunk().getMin()));
+ auto chunkDoc = uassertStatusOK(
+ getChunkDoc(operationContext(), nonJumboChunk().getMin(), collEpoch, collTimestamp));
ASSERT_FALSE(chunkDoc.getJumbo());
- ASSERT_EQ(ChunkVersion(14, 7, epoch(), boost::none /* timestamp */), chunkDoc.getVersion());
+ ASSERT_EQ(ChunkVersion(14, 7, collEpoch, collTimestamp), chunkDoc.getVersion());
}
TEST_F(ClearJumboFlagTest, AssertsOnEpochMismatch) {