diff options
Diffstat (limited to 'src/mongo/unittest')
-rw-r--r-- | src/mongo/unittest/task_executor_proxy.cpp | 4 | ||||
-rw-r--r-- | src/mongo/unittest/task_executor_proxy.h | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/mongo/unittest/task_executor_proxy.cpp b/src/mongo/unittest/task_executor_proxy.cpp index 4c2804db3b8..4fdffbac8ae 100644 --- a/src/mongo/unittest/task_executor_proxy.cpp +++ b/src/mongo/unittest/task_executor_proxy.cpp @@ -138,5 +138,9 @@ void TaskExecutorProxy::appendConnectionStats(executor::ConnectionPoolStats* sta _executor.load()->appendConnectionStats(stats); } +void TaskExecutorProxy::dropConnections(const HostAndPort& hostAndPort) { + _executor.load()->dropConnections(hostAndPort); +} + } // namespace unittest } // namespace mongo diff --git a/src/mongo/unittest/task_executor_proxy.h b/src/mongo/unittest/task_executor_proxy.h index 05a2a11a2a3..2507a230458 100644 --- a/src/mongo/unittest/task_executor_proxy.h +++ b/src/mongo/unittest/task_executor_proxy.h @@ -36,6 +36,13 @@ namespace unittest { /** * Proxy for the executor::TaskExecutor interface used for testing. + * + * Note that the following calls will affect other proxies that share the underlying executor: + * - startup() + * - shutdown() + * - apperndDiagnosticBSON() + * - appendConnectionStats() + * - dropConnections() */ class TaskExecutorProxy : public executor::TaskExecutor { TaskExecutorProxy(const TaskExecutorProxy&) = delete; @@ -80,6 +87,7 @@ public: void wait(const CallbackHandle& cbHandle, Interruptible* interruptible = Interruptible::notInterruptible()) override; void appendConnectionStats(executor::ConnectionPoolStats* stats) const override; + void dropConnections(const HostAndPort& hostAndPort) override; private: // Not owned by us. |