summaryrefslogtreecommitdiff
path: root/src/mongo/unittest
diff options
context:
space:
mode:
authorAndy Schwerin <Andy Schwerin schwerin@mongodb.com>2017-04-05 16:56:55 -0400
committerAndy Schwerin <Andy Schwerin schwerin@mongodb.com>2017-04-06 18:25:12 -0400
commitb8a07e36c6a893c57b6728acca8111993f0c7067 (patch)
tree74bca1073ed5140348dc79ebb8aae6ba9637c63c /src/mongo/unittest
parent1e28d93c599dcc963eb53986c2e8fb2bc4f8935c (diff)
downloadmongo-b8a07e36c6a893c57b6728acca8111993f0c7067.tar.gz
SERVER-28624 Further reduce dependency on ReplicationExecutor type.
* Replace getDiagnosticString() with appendDiagnosticBSON() in TaskExecutors. * Introduce appendDiagnostics to ReplicationCoordinator, to hide the implementation detail that ReplicationCoordinatorImpl has a TaskExecutor.
Diffstat (limited to 'src/mongo/unittest')
-rw-r--r--src/mongo/unittest/task_executor_proxy.cpp4
-rw-r--r--src/mongo/unittest/task_executor_proxy.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/unittest/task_executor_proxy.cpp b/src/mongo/unittest/task_executor_proxy.cpp
index ffaf7b049c9..ccd8e9e6b02 100644
--- a/src/mongo/unittest/task_executor_proxy.cpp
+++ b/src/mongo/unittest/task_executor_proxy.cpp
@@ -57,8 +57,8 @@ void TaskExecutorProxy::join() {
_executor->join();
}
-std::string TaskExecutorProxy::getDiagnosticString() const {
- return _executor->getDiagnosticString();
+void TaskExecutorProxy::appendDiagnosticBSON(mongo::BSONObjBuilder* builder) const {
+ _executor->appendDiagnosticBSON(builder);
}
Date_t TaskExecutorProxy::now() {
diff --git a/src/mongo/unittest/task_executor_proxy.h b/src/mongo/unittest/task_executor_proxy.h
index 4f2076f4991..738a53d9322 100644
--- a/src/mongo/unittest/task_executor_proxy.h
+++ b/src/mongo/unittest/task_executor_proxy.h
@@ -53,7 +53,7 @@ public:
virtual void startup() override;
virtual void shutdown() override;
virtual void join() override;
- virtual std::string getDiagnosticString() const override;
+ virtual void appendDiagnosticBSON(BSONObjBuilder* builder) const override;
virtual Date_t now() override;
virtual StatusWith<EventHandle> makeEvent() override;
virtual void signalEvent(const EventHandle& event) override;