summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/collection_sharding_runtime_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/s/collection_sharding_runtime_test.cpp')
-rw-r--r--src/mongo/db/s/collection_sharding_runtime_test.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mongo/db/s/collection_sharding_runtime_test.cpp b/src/mongo/db/s/collection_sharding_runtime_test.cpp
index 00fdf7872bd..41442237766 100644
--- a/src/mongo/db/s/collection_sharding_runtime_test.cpp
+++ b/src/mongo/db/s/collection_sharding_runtime_test.cpp
@@ -78,11 +78,8 @@ protected:
boost::none);
if (!OperationShardingState::isOperationVersioned(opCtx)) {
- const auto version = cm.getVersion(ShardId("0"));
- BSONObjBuilder builder;
- version.serializeToBSON(ChunkVersion::kShardVersionField, &builder);
- auto& oss = OperationShardingState::get(opCtx);
- oss.initializeClientRoutingVersionsFromCommand(kTestNss, builder.obj());
+ OperationShardingState::get(opCtx).initializeClientRoutingVersions(
+ kTestNss, cm.getVersion(ShardId("0")), boost::none);
}
return CollectionMetadata(std::move(cm), ShardId("0"));