summaryrefslogtreecommitdiff
path: root/src/mongo/transport
diff options
context:
space:
mode:
authorJanna Golden <janna.golden@mongodb.com>2020-02-19 20:26:38 +0000
committerevergreen <evergreen@mongodb.com>2020-02-19 20:26:38 +0000
commit49643264238b895bd5ec1dfb39597f75a1db60ec (patch)
treeafb2b7ce01c74e96f2a635db6b7b3a94c408cba0 /src/mongo/transport
parent8dd337953bdf7b918da37fb7f32b3200e9c0c12b (diff)
downloadmongo-49643264238b895bd5ec1dfb39597f75a1db60ec.tar.gz
SERVER-45114 Connect AsyncDBClient exhaust functionality throughout
Diffstat (limited to 'src/mongo/transport')
-rw-r--r--src/mongo/transport/transport_layer_asio_integration_test.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/mongo/transport/transport_layer_asio_integration_test.cpp b/src/mongo/transport/transport_layer_asio_integration_test.cpp
index 80aa571c2bd..ca8211af7b0 100644
--- a/src/mongo/transport/transport_layer_asio_integration_test.cpp
+++ b/src/mongo/transport/transport_layer_asio_integration_test.cpp
@@ -178,7 +178,7 @@ private:
// called when a server sends a new isMaster exhaust response. Updates _reply and _replyUpdated.
AsyncDBClient::RemoteCommandCallbackFn _callbackFn =
- [&](const executor::RemoteCommandResponse& response) {
+ [&](const executor::RemoteCommandResponse& response, bool isMoreToComeSet) {
{
stdx::unique_lock<Latch> lk(_mutex);
_reply = response;
@@ -302,6 +302,18 @@ TEST(TransportLayerASIO, exhaustIsMasterShouldStopOnFailure) {
nullptr};
assertOK(failpointHandle->runCommandRequest(configureFailPointRequest).get());
+ ON_BLOCK_EXIT([&] {
+ auto stopFpRequest = executor::RemoteCommandRequest{server,
+ "admin",
+ BSON("configureFailPoint"
+ << "failCommand"
+ << "mode"
+ << "off"),
+ BSONObj(),
+ nullptr};
+ assertOK(failpointHandle->runCommandRequest(stopFpRequest).get());
+ });
+
// Send a dummy topologyVersion because the mongod generates this and sends it to the client on
// the initial handshake.
auto isMasterRequest = executor::RemoteCommandRequest{
@@ -323,18 +335,6 @@ TEST(TransportLayerASIO, exhaustIsMasterShouldStopOnFailure) {
ASSERT_OK(reply.status);
ASSERT_EQ(reply.data["ok"].Double(), 0.0);
}
-
- ON_BLOCK_EXIT([&] {
- auto stopFpRequest = executor::RemoteCommandRequest{server,
- "admin",
- BSON("configureFailPoint"
- << "failCommand"
- << "mode"
- << "off"),
- BSONObj(),
- nullptr};
- assertOK(failpointHandle->runCommandRequest(stopFpRequest).get());
- });
}
} // namespace