diff options
Diffstat (limited to 'src/mongo/s/catalog/replset/catalog_manager_replica_set_test_fixture.cpp')
-rw-r--r-- | src/mongo/s/catalog/replset/catalog_manager_replica_set_test_fixture.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mongo/s/catalog/replset/catalog_manager_replica_set_test_fixture.cpp b/src/mongo/s/catalog/replset/catalog_manager_replica_set_test_fixture.cpp index 3b0036418a5..36eb4bbac64 100644 --- a/src/mongo/s/catalog/replset/catalog_manager_replica_set_test_fixture.cpp +++ b/src/mongo/s/catalog/replset/catalog_manager_replica_set_test_fixture.cpp @@ -189,6 +189,11 @@ void CatalogManagerReplSetTestFixture::onFindCommand(NetworkTestEnv::OnFindComma _networkTestEnv->onFindCommand(func); } +void CatalogManagerReplSetTestFixture::onFindWithMetadataCommand( + NetworkTestEnv::OnFindCommandWithMetadataFunction func) { + _networkTestEnv->onFindWithMetadataCommand(func); +} + void CatalogManagerReplSetTestFixture::setupShards(const std::vector<ShardType>& shards) { auto future = launchAsync([this] { shardRegistry()->reload(); }); @@ -198,7 +203,7 @@ void CatalogManagerReplSetTestFixture::setupShards(const std::vector<ShardType>& } void CatalogManagerReplSetTestFixture::expectGetShards(const std::vector<ShardType>& shards) { - onFindCommand([&shards](const RemoteCommandRequest& request) { + onFindCommand([this, &shards](const RemoteCommandRequest& request) { const NamespaceString nss(request.dbname, request.cmdObj.firstElement().String()); ASSERT_EQ(nss.toString(), ShardType::ConfigNS); @@ -212,6 +217,8 @@ void CatalogManagerReplSetTestFixture::expectGetShards(const std::vector<ShardTy ASSERT_EQ(query->getSort(), BSONObj()); ASSERT_FALSE(query->getLimit().is_initialized()); + checkReadConcern(request.cmdObj, Timestamp(0, 0), 0); + vector<BSONObj> shardsToReturn; std::transform(shards.begin(), |