summaryrefslogtreecommitdiff
path: root/src/mongo/db/s
diff options
context:
space:
mode:
authorEsha Maharishi <esha.maharishi@mongodb.com>2016-04-19 16:40:46 -0400
committerEsha Maharishi <esha.maharishi@mongodb.com>2016-04-20 14:06:29 -0400
commitdf2f86ca7e25422b72a3ea4b93cfcc33faab8fe9 (patch)
tree3431544872c1b6a00037639769fe187516279d0f /src/mongo/db/s
parent3160807e82d2601009083b924d8190b5a1b9eec1 (diff)
downloadmongo-df2f86ca7e25422b72a3ea4b93cfcc33faab8fe9.tar.gz
SERVER-23495 Add abstract Shard class and shift the ShardRemote implementation into its own class
Diffstat (limited to 'src/mongo/db/s')
-rw-r--r--src/mongo/db/s/sharding_state_test.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/db/s/sharding_state_test.cpp b/src/mongo/db/s/sharding_state_test.cpp
index 922237e96e0..3fb118ec87e 100644
--- a/src/mongo/db/s/sharding_state_test.cpp
+++ b/src/mongo/db/s/sharding_state_test.cpp
@@ -29,6 +29,7 @@
#include "mongo/platform/basic.h"
#include "mongo/base/status_with.h"
+#include "mongo/client/remote_command_targeter_factory_mock.h"
#include "mongo/client/replica_set_monitor.h"
#include "mongo/db/service_context_noop.h"
#include "mongo/executor/network_interface_mock.h"
@@ -42,7 +43,7 @@
#include "mongo/s/balancer/balancer_configuration.h"
#include "mongo/s/catalog/catalog_cache.h"
#include "mongo/s/catalog/catalog_manager_mock.h"
-#include "mongo/s/client/shard_factory_mock.h"
+#include "mongo/s/client/shard_factory.h"
#include "mongo/s/client/shard_registry.h"
#include "mongo/s/grid.h"
#include "mongo/s/query/cluster_cursor_manager.h"
@@ -57,8 +58,6 @@ namespace {
* Initializes the grid object with the bare minimum and is not intended to be functional.
*/
void initGrid(OperationContext* txn, const ConnectionString& configConnString) {
- auto shardFactory(stdx::make_unique<ShardFactoryMock>());
-
// Set up executor pool used for most operations.
auto fixedNet = stdx::make_unique<executor::NetworkInterfaceMock>();
auto mockNetwork = fixedNet.get();
@@ -75,6 +74,8 @@ void initGrid(OperationContext* txn, const ConnectionString& configConnString) {
executorPool->addExecutors(std::move(executorsForPool), std::move(fixedExec));
executorPool->startup();
+ auto shardFactory(
+ stdx::make_unique<ShardFactory>(stdx::make_unique<RemoteCommandTargeterFactoryMock>()));
auto shardRegistry(stdx::make_unique<ShardRegistry>(std::move(shardFactory), configConnString));
grid.init(