summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/sbe_stage_builder_test_fixture.cpp
diff options
context:
space:
mode:
authorMohammad Dashti <mdashti@gmail.com>2022-04-29 03:08:47 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-04-29 04:00:08 +0000
commit93318294edbf4c9fae67593f5bc2623d4bf724fb (patch)
tree3d99a09294eec304347263e0a4c52a04ee371e92 /src/mongo/db/query/sbe_stage_builder_test_fixture.cpp
parent6080d01374318ab0a9e6be4ba0f0c1643caaf3a7 (diff)
downloadmongo-93318294edbf4c9fae67593f5bc2623d4bf724fb.tar.gz
SERVER-64252 Make `LookupStageBuilderTest` inherit from `CatalogTestFixture` to avoid duplicate `setUp()` logic
Diffstat (limited to 'src/mongo/db/query/sbe_stage_builder_test_fixture.cpp')
-rw-r--r--src/mongo/db/query/sbe_stage_builder_test_fixture.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/mongo/db/query/sbe_stage_builder_test_fixture.cpp b/src/mongo/db/query/sbe_stage_builder_test_fixture.cpp
index 24a2669dda0..c6b0525dea9 100644
--- a/src/mongo/db/query/sbe_stage_builder_test_fixture.cpp
+++ b/src/mongo/db/query/sbe_stage_builder_test_fixture.cpp
@@ -56,22 +56,25 @@ SbeStageBuilderTestFixture::buildPlanStage(
std::unique_ptr<CollatorInterface> collator) {
auto findCommand = std::make_unique<FindCommandRequest>(_nss);
const boost::intrusive_ptr<ExpressionContext> expCtx(
- new ExpressionContextForTest(opCtx(), _nss, std::move(collator)));
+ new ExpressionContextForTest(operationContext(), _nss, std::move(collator)));
auto statusWithCQ =
- CanonicalQuery::canonicalize(opCtx(), std::move(findCommand), false, expCtx);
+ CanonicalQuery::canonicalize(operationContext(), std::move(findCommand), false, expCtx);
ASSERT_OK(statusWithCQ.getStatus());
CollectionMock coll(_nss);
CollectionPtr collPtr(&coll);
MultipleCollectionAccessor& colls = _collections;
if (shardFiltererInterface) {
- auto shardFilterer = shardFiltererInterface->makeShardFilterer(opCtx());
+ auto shardFilterer = shardFiltererInterface->makeShardFilterer(operationContext());
collPtr.setShardKeyPattern(shardFilterer->getKeyPattern().toBSON());
colls = MultipleCollectionAccessor(collPtr);
}
- stage_builder::SlotBasedStageBuilder builder{
- opCtx(), colls, *statusWithCQ.getValue(), *querySolution, nullptr /* YieldPolicy */};
+ stage_builder::SlotBasedStageBuilder builder{operationContext(),
+ colls,
+ *statusWithCQ.getValue(),
+ *querySolution,
+ nullptr /* YieldPolicy */};
auto stage = builder.build(querySolution->root());
auto data = builder.getPlanStageData();
@@ -79,7 +82,7 @@ SbeStageBuilderTestFixture::buildPlanStage(
// Reset "shardFilterer".
if (auto shardFiltererSlot = data.env->getSlotIfExists("shardFilterer"_sd);
shardFiltererSlot && shardFiltererInterface) {
- auto shardFilterer = shardFiltererInterface->makeShardFilterer(opCtx());
+ auto shardFilterer = shardFiltererInterface->makeShardFilterer(operationContext());
data.env->resetSlot(*shardFiltererSlot,
sbe::value::TypeTags::shardFilterer,
sbe::value::bitcastFrom<ShardFilterer*>(shardFilterer.release()),