summaryrefslogtreecommitdiff
path: root/src/mongo/executor
diff options
context:
space:
mode:
authorBen Caimano <ben.caimano@10gen.com>2018-12-12 09:49:13 -0500
committerBen Caimano <ben.caimano@10gen.com>2018-12-13 13:28:07 -0500
commitea10ad36115843fedcf34490b6e92e2bd5ef0d20 (patch)
tree2eae5350a71736c96e73e5447d14a5fa2faa28d9 /src/mongo/executor
parentc1954ac6bdb34c22274d70e8fabbd04555ec7bb2 (diff)
downloadmongo-ea10ad36115843fedcf34490b6e92e2bd5ef0d20.tar.gz
SERVER-38549 Make NetworkInterfaceMock return NetworkInterfaceExceededTimeLimit
Diffstat (limited to 'src/mongo/executor')
-rw-r--r--src/mongo/executor/network_interface_mock.cpp3
-rw-r--r--src/mongo/executor/task_executor_test_common.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/executor/network_interface_mock.cpp b/src/mongo/executor/network_interface_mock.cpp
index 242e81126f6..c7c5178761a 100644
--- a/src/mongo/executor/network_interface_mock.cpp
+++ b/src/mongo/executor/network_interface_mock.cpp
@@ -467,7 +467,8 @@ void NetworkInterfaceMock::_enqueueOperation_inlock(
if (timeout != RemoteCommandRequest::kNoTimeout) {
invariant(timeout >= Milliseconds(0));
- ResponseStatus rs(ErrorCodes::NetworkTimeout, "Network timeout", Milliseconds(0));
+ ResponseStatus rs(
+ ErrorCodes::NetworkInterfaceExceededTimeLimit, "Network timeout", Milliseconds(0));
std::vector<NetworkOperationList*> queuesToCheck{&_unscheduled, &_blackHoled, &_scheduled};
_alarms.emplace(_now_inlock() + timeout, [
this,
diff --git a/src/mongo/executor/task_executor_test_common.cpp b/src/mongo/executor/task_executor_test_common.cpp
index 42373c2b47b..fde8775fa3d 100644
--- a/src/mongo/executor/task_executor_test_common.cpp
+++ b/src/mongo/executor/task_executor_test_common.cpp
@@ -487,7 +487,7 @@ COMMON_EXECUTOR_TEST(RemoteCommandWithTimeout) {
ASSERT_EQUALS(startTime + Milliseconds(2), net->now());
net->exitNetwork();
executor.wait(cbHandle);
- ASSERT_EQUALS(ErrorCodes::NetworkTimeout, status);
+ ASSERT_EQUALS(ErrorCodes::NetworkInterfaceExceededTimeLimit, status);
}
COMMON_EXECUTOR_TEST(CallbackHandleComparison) {