summaryrefslogtreecommitdiff
path: root/src/mongo/executor/network_interface_mock.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/executor/network_interface_mock.h')
-rw-r--r--src/mongo/executor/network_interface_mock.h21
1 files changed, 2 insertions, 19 deletions
diff --git a/src/mongo/executor/network_interface_mock.h b/src/mongo/executor/network_interface_mock.h
index b8610d58d9d..e096589d640 100644
--- a/src/mongo/executor/network_interface_mock.h
+++ b/src/mongo/executor/network_interface_mock.h
@@ -41,7 +41,6 @@
#include "mongo/stdx/condition_variable.h"
#include "mongo/stdx/unordered_map.h"
#include "mongo/stdx/unordered_set.h"
-#include "mongo/transport/mock_session.h"
#include "mongo/util/clock_source.h"
#include "mongo/util/clock_source_mock.h"
#include "mongo/util/time_support.h"
@@ -149,20 +148,6 @@ public:
void testEgress(const HostAndPort&, transport::ConnectSSLMode, Milliseconds, Status) override {}
- using LeasedStreamMaker =
- std::function<std::unique_ptr<NetworkInterface::LeasedStream>(HostAndPort)>;
-
- void setLeasedStreamMaker(LeasedStreamMaker lsm) {
- _leasedStreamMaker = std::move(lsm);
- }
-
- SemiFuture<std::unique_ptr<NetworkInterface::LeasedStream>> leaseStream(
- const HostAndPort& hp, transport::ConnectSSLMode, Milliseconds) override {
- invariant(_leasedStreamMaker,
- "Tried to lease a stream from NetworkInterfaceMock without providing one");
- return (*_leasedStreamMaker)(hp);
- }
-
////////////////////////////////////////////////////////////////////////////////
//
// Methods for simulating network operations and the passage of time.
@@ -288,9 +273,9 @@ public:
void runReadyNetworkOperations();
/**
- * Sets the reply of the 'hello' handshake for a specific host. This reply will only
+ * Sets the reply of the 'isMaster' handshake for a specific host. This reply will only
* be given to the 'validateHost' method of the ConnectionHook set on this object - NOT
- * to the completion handlers of any 'hello' commands scheduled with 'startCommand'.
+ * to the completion handlers of any 'isMaster' commands scheduled with 'startCommand'.
*
* This reply will persist until it is changed again using this method.
*
@@ -461,8 +446,6 @@ private:
// The handshake replies set for each host.
stdx::unordered_map<HostAndPort, RemoteCommandResponse> _handshakeReplies; // (M)
-
- boost::optional<LeasedStreamMaker> _leasedStreamMaker;
};
/**