summaryrefslogtreecommitdiff
path: root/src/mongo/transport/transport_layer_asio_integration_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/transport/transport_layer_asio_integration_test.cpp')
-rw-r--r--src/mongo/transport/transport_layer_asio_integration_test.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mongo/transport/transport_layer_asio_integration_test.cpp b/src/mongo/transport/transport_layer_asio_integration_test.cpp
index 0e595449d54..d43885da603 100644
--- a/src/mongo/transport/transport_layer_asio_integration_test.cpp
+++ b/src/mongo/transport/transport_layer_asio_integration_test.cpp
@@ -33,6 +33,7 @@
#include "mongo/client/async_client.h"
#include "mongo/client/connection_string.h"
#include "mongo/db/client.h"
+#include "mongo/db/operation_context.h"
#include "mongo/db/service_context.h"
#include "mongo/stdx/thread.h"
#include "mongo/transport/session.h"
@@ -128,11 +129,7 @@ TEST(TransportLayerASIO, ShortReadsAndWritesWork) {
auto future = handle->runCommandRequest(ecr, baton);
const auto batonGuard = MakeGuard([&] { baton->detach(); });
- while (!future.isReady()) {
- baton->run(nullptr, boost::none);
- }
-
- assertOK(future.get());
+ future.get(opCtx.get());
}
}