summaryrefslogtreecommitdiff
path: root/src/mongo/unittest
diff options
context:
space:
mode:
authorMartin Neupauer <martin.neupauer@mongodb.com>2018-01-18 12:04:01 -0500
committerMartin Neupauer <martin.neupauer@mongodb.com>2018-01-31 15:05:08 -0500
commit15a7ac9ca54f2d580e2b1d1ab01fe095be1233db (patch)
treec3628b0d5be60aa6bd911c8c351daa9606f6b060 /src/mongo/unittest
parent3c349c50d8d5a55fa80c1d7ae3ac6a6f6cc82b5e (diff)
downloadmongo-15a7ac9ca54f2d580e2b1d1ab01fe095be1233db.tar.gz
SERVER-31484 separate the operation deadline from awaitData deadline in sharded queries.
The deadline has been been already separated for non-sharded queries.
Diffstat (limited to 'src/mongo/unittest')
-rw-r--r--src/mongo/unittest/task_executor_proxy.cpp6
-rw-r--r--src/mongo/unittest/task_executor_proxy.h4
2 files changed, 7 insertions, 3 deletions
diff --git a/src/mongo/unittest/task_executor_proxy.cpp b/src/mongo/unittest/task_executor_proxy.cpp
index 189b68f4b25..03a9c90246e 100644
--- a/src/mongo/unittest/task_executor_proxy.cpp
+++ b/src/mongo/unittest/task_executor_proxy.cpp
@@ -82,8 +82,10 @@ void TaskExecutorProxy::waitForEvent(const EventHandle& event) {
_executor->waitForEvent(event);
}
-Status TaskExecutorProxy::waitForEvent(OperationContext* opCtx, const EventHandle& event) {
- return _executor->waitForEvent(opCtx, event);
+StatusWith<stdx::cv_status> TaskExecutorProxy::waitForEvent(OperationContext* opCtx,
+ const EventHandle& event,
+ Date_t deadline) {
+ return _executor->waitForEvent(opCtx, event, deadline);
}
StatusWith<executor::TaskExecutor::CallbackHandle> TaskExecutorProxy::scheduleWork(
diff --git a/src/mongo/unittest/task_executor_proxy.h b/src/mongo/unittest/task_executor_proxy.h
index 3607d5fa7df..fdcbc9c71d4 100644
--- a/src/mongo/unittest/task_executor_proxy.h
+++ b/src/mongo/unittest/task_executor_proxy.h
@@ -60,7 +60,9 @@ public:
virtual StatusWith<CallbackHandle> onEvent(const EventHandle& event,
const CallbackFn& work) override;
virtual void waitForEvent(const EventHandle& event) override;
- virtual Status waitForEvent(OperationContext* opCtx, const EventHandle& event) override;
+ virtual StatusWith<stdx::cv_status> waitForEvent(OperationContext* opCtx,
+ const EventHandle& event,
+ Date_t deadline) override;
virtual StatusWith<CallbackHandle> scheduleWork(const CallbackFn& work) override;
virtual StatusWith<CallbackHandle> scheduleWorkAt(Date_t when, const CallbackFn& work) override;
virtual StatusWith<CallbackHandle> scheduleRemoteCommand(