summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/topology_coordinator_test.cpp
diff options
context:
space:
mode:
authorMatthew Russotto <matthew.russotto@10gen.com>2017-11-27 10:32:07 -0500
committerMatthew Russotto <matthew.russotto@10gen.com>2017-11-28 15:59:13 -0500
commit26b42901e302db19cfbdbf3726b7be6fb624f4f5 (patch)
tree3e1a3e8f57c584ea3131b6fda11d84531b3077eb /src/mongo/db/repl/topology_coordinator_test.cpp
parente38cf83f058f2e29e41c4fe2f02b7fbc405ceb8c (diff)
downloadmongo-26b42901e302db19cfbdbf3726b7be6fb624f4f5.tar.gz
SERVER-30626 Remove TopologyCoordinator interface.
Diffstat (limited to 'src/mongo/db/repl/topology_coordinator_test.cpp')
-rw-r--r--src/mongo/db/repl/topology_coordinator_test.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/mongo/db/repl/topology_coordinator_test.cpp b/src/mongo/db/repl/topology_coordinator_test.cpp
index a22aec9f72f..034aaabda89 100644
--- a/src/mongo/db/repl/topology_coordinator_test.cpp
+++ b/src/mongo/db/repl/topology_coordinator_test.cpp
@@ -37,7 +37,6 @@
#include "mongo/db/repl/repl_set_heartbeat_response.h"
#include "mongo/db/repl/repl_set_request_votes_args.h"
#include "mongo/db/repl/topology_coordinator.h"
-#include "mongo/db/repl/topology_coordinator_impl.h"
#include "mongo/db/server_options.h"
#include "mongo/executor/task_executor.h"
#include "mongo/logger/logger.h"
@@ -73,9 +72,9 @@ bool stringContains(const std::string& haystack, const std::string& needle) {
class TopoCoordTest : public mongo::unittest::Test {
public:
virtual void setUp() {
- _options = TopologyCoordinatorImpl::Options{};
+ _options = TopologyCoordinator::Options{};
_options.maxSyncSourceLagSecs = Seconds{100};
- _topo.reset(new TopologyCoordinatorImpl(_options));
+ _topo.reset(new TopologyCoordinator(_options));
_now = Date_t();
_selfIndex = -1;
_cbData.reset(new executor::TaskExecutor::CallbackArgs(
@@ -88,7 +87,7 @@ public:
}
protected:
- TopologyCoordinatorImpl& getTopoCoord() {
+ TopologyCoordinator& getTopoCoord() {
return *_topo;
}
executor::TaskExecutor::CallbackArgs cbData() {
@@ -98,9 +97,9 @@ protected:
return _now;
}
- void setOptions(const TopologyCoordinatorImpl::Options& options) {
+ void setOptions(const TopologyCoordinator::Options& options) {
_options = options;
- _topo.reset(new TopologyCoordinatorImpl(_options));
+ _topo.reset(new TopologyCoordinator(_options));
}
int64_t countLogLinesContaining(const std::string& needle) {
@@ -239,12 +238,12 @@ private:
}
private:
- unique_ptr<TopologyCoordinatorImpl> _topo;
+ unique_ptr<TopologyCoordinator> _topo;
unique_ptr<executor::TaskExecutor::CallbackArgs> _cbData;
ReplSetConfig _currentConfig;
Date_t _now;
int _selfIndex;
- TopologyCoordinatorImpl::Options _options;
+ TopologyCoordinator::Options _options;
};
TEST_F(TopoCoordTest, NodeReturnsSecondaryWithMostRecentDataAsSyncSource) {
@@ -6263,7 +6262,7 @@ TEST_F(TopoCoordTest, DoNotGrantDryRunVoteWhenOpTimeIsStale) {
TEST_F(TopoCoordTest, CSRSConfigServerRejectsPV0Config) {
ON_BLOCK_EXIT([]() { serverGlobalParams.clusterRole = ClusterRole::None; });
serverGlobalParams.clusterRole = ClusterRole::ConfigServer;
- TopologyCoordinatorImpl::Options options;
+ TopologyCoordinator::Options options;
options.clusterRole = ClusterRole::ConfigServer;
setOptions(options);
getTopoCoord().setStorageEngineSupportsReadCommitted(false);