summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/query_stage_cached_plan.cpp
diff options
context:
space:
mode:
authorWaley Chen <waleycz@gmail.com>2016-05-02 17:42:40 -0400
committerWaley Chen <waleycz@gmail.com>2016-05-02 18:18:48 -0400
commitda38826985001daff55c7e2f723f73f5263e2dbf (patch)
tree947fac050de09b26e1ee1e7626cb519f30f39a1b /src/mongo/dbtests/query_stage_cached_plan.cpp
parenta45700cc0121c53b09c8fb6761703509427cff62 (diff)
downloadmongo-da38826985001daff55c7e2f723f73f5263e2dbf.tar.gz
SERVER-23243 Replace Listener::getElapsedTimeMillis() in elapsed_tracker.cpp
Diffstat (limited to 'src/mongo/dbtests/query_stage_cached_plan.cpp')
-rw-r--r--src/mongo/dbtests/query_stage_cached_plan.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/dbtests/query_stage_cached_plan.cpp b/src/mongo/dbtests/query_stage_cached_plan.cpp
index 865ee18dacc..32550bc2172 100644
--- a/src/mongo/dbtests/query_stage_cached_plan.cpp
+++ b/src/mongo/dbtests/query_stage_cached_plan.cpp
@@ -47,9 +47,11 @@
#include "mongo/db/query/query_planner_params.h"
#include "mongo/dbtests/dbtests.h"
#include "mongo/stdx/memory.h"
+#include "mongo/util/clock_source_mock.h"
namespace QueryStageCachedPlan {
+const std::unique_ptr<ClockSource> clockSource = stdx::make_unique<ClockSourceMock>();
static const NamespaceString nss("unittests.QueryStageCachedPlan");
class QueryStageCachedPlanBase {
@@ -141,7 +143,7 @@ public:
&_txn, collection, &_ws, cq.get(), plannerParams, decisionWorks, mockChild.release());
// This should succeed after triggering a replan.
- PlanYieldPolicy yieldPolicy(nullptr, PlanExecutor::YIELD_MANUAL);
+ PlanYieldPolicy yieldPolicy(PlanExecutor::YIELD_MANUAL, clockSource.get());
ASSERT_OK(cachedPlanStage.pickBestPlan(&yieldPolicy));
// Make sure that we get 2 legit results back.
@@ -210,7 +212,7 @@ public:
&_txn, collection, &_ws, cq.get(), plannerParams, decisionWorks, mockChild.release());
// This should succeed after triggering a replan.
- PlanYieldPolicy yieldPolicy(nullptr, PlanExecutor::YIELD_MANUAL);
+ PlanYieldPolicy yieldPolicy(PlanExecutor::YIELD_MANUAL, clockSource.get());
ASSERT_OK(cachedPlanStage.pickBestPlan(&yieldPolicy));
// Make sure that we get 2 legit results back.