summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/query_stage_subplan.cpp
diff options
context:
space:
mode:
authorWaley Chen <waleycz@gmail.com>2016-05-02 18:28:51 -0400
committerWaley Chen <waleycz@gmail.com>2016-05-02 18:28:51 -0400
commit7f8861fbb04b9188e793f762fe2cfc01266fcf30 (patch)
tree32b57e6eb86a643656f1ea1792637423d3cc5586 /src/mongo/dbtests/query_stage_subplan.cpp
parentda38826985001daff55c7e2f723f73f5263e2dbf (diff)
downloadmongo-7f8861fbb04b9188e793f762fe2cfc01266fcf30.tar.gz
Revert "SERVER-23243 Replace Listener::getElapsedTimeMillis() in elapsed_tracker.cpp"
This reverts commit da38826985001daff55c7e2f723f73f5263e2dbf.
Diffstat (limited to 'src/mongo/dbtests/query_stage_subplan.cpp')
-rw-r--r--src/mongo/dbtests/query_stage_subplan.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/mongo/dbtests/query_stage_subplan.cpp b/src/mongo/dbtests/query_stage_subplan.cpp
index b703c0bf74c..09f27a679e4 100644
--- a/src/mongo/dbtests/query_stage_subplan.cpp
+++ b/src/mongo/dbtests/query_stage_subplan.cpp
@@ -43,11 +43,9 @@
#include "mongo/db/query/canonical_query.h"
#include "mongo/db/query/get_executor.h"
#include "mongo/dbtests/dbtests.h"
-#include "mongo/util/clock_source_mock.h"
namespace QueryStageSubplan {
-const std::unique_ptr<ClockSource> clockSource = stdx::make_unique<ClockSourceMock>();
static const NamespaceString nss("unittests.QueryStageSubplan");
class QueryStageSubplanBase {
@@ -126,7 +124,7 @@ public:
new SubplanStage(&_txn, collection, &ws, plannerParams, cq.get()));
// Plan selection should succeed due to falling back on regular planning.
- PlanYieldPolicy yieldPolicy(PlanExecutor::YIELD_MANUAL, clockSource.get());
+ PlanYieldPolicy yieldPolicy(NULL, PlanExecutor::YIELD_MANUAL);
ASSERT_OK(subplan->pickBestPlan(&yieldPolicy));
}
};
@@ -167,7 +165,7 @@ public:
std::unique_ptr<SubplanStage> subplan(
new SubplanStage(&_txn, collection, &ws, plannerParams, cq.get()));
- PlanYieldPolicy yieldPolicy(PlanExecutor::YIELD_MANUAL, clockSource.get());
+ PlanYieldPolicy yieldPolicy(NULL, PlanExecutor::YIELD_MANUAL);
ASSERT_OK(subplan->pickBestPlan(&yieldPolicy));
// Nothing is in the cache yet, so neither branch should have been planned from
@@ -223,7 +221,7 @@ public:
std::unique_ptr<SubplanStage> subplan(
new SubplanStage(&_txn, collection, &ws, plannerParams, cq.get()));
- PlanYieldPolicy yieldPolicy(PlanExecutor::YIELD_MANUAL, clockSource.get());
+ PlanYieldPolicy yieldPolicy(nullptr, PlanExecutor::YIELD_MANUAL);
ASSERT_OK(subplan->pickBestPlan(&yieldPolicy));
// Nothing is in the cache yet, so neither branch should have been planned from
@@ -280,7 +278,7 @@ public:
std::unique_ptr<SubplanStage> subplan(
new SubplanStage(&_txn, collection, &ws, plannerParams, cq.get()));
- PlanYieldPolicy yieldPolicy(PlanExecutor::YIELD_MANUAL, clockSource.get());
+ PlanYieldPolicy yieldPolicy(nullptr, PlanExecutor::YIELD_MANUAL);
ASSERT_OK(subplan->pickBestPlan(&yieldPolicy));
// Nothing is in the cache yet, so neither branch should have been planned from
@@ -535,7 +533,7 @@ public:
new SubplanStage(&_txn, collection, &ws, plannerParams, cq.get()));
// Plan selection should succeed due to falling back on regular planning.
- PlanYieldPolicy yieldPolicy(PlanExecutor::YIELD_MANUAL, clockSource.get());
+ PlanYieldPolicy yieldPolicy(nullptr, PlanExecutor::YIELD_MANUAL);
ASSERT_OK(subplan->pickBestPlan(&yieldPolicy));
// Work the stage until it produces all results.
@@ -593,7 +591,7 @@ public:
std::unique_ptr<SubplanStage> subplan(
new SubplanStage(&_txn, collection, &ws, plannerParams, cq.get()));
- PlanYieldPolicy yieldPolicy(PlanExecutor::YIELD_MANUAL, clockSource.get());
+ PlanYieldPolicy yieldPolicy(nullptr, PlanExecutor::YIELD_MANUAL);
ASSERT_OK(subplan->pickBestPlan(&yieldPolicy));
size_t numResults = 0;