diff --git a/tests/Aql/ShortestPathExecutorTest.cpp b/tests/Aql/ShortestPathExecutorTest.cpp index dae679978c..cd22dc90b6 100644 --- a/tests/Aql/ShortestPathExecutorTest.cpp +++ b/tests/Aql/ShortestPathExecutorTest.cpp @@ -211,7 +211,7 @@ static void ValidateResult(ShortestPathExecutorInfos& infos, OutputAqlItemRow& r } } static void TestExecutor(ShortestPathExecutorInfos& infos, - std::shared_ptr input, + std::shared_ptr const& input, std::vector> const& resultPaths) { ResourceMonitor monitor; AqlItemBlockManager itemBlockManager{&monitor}; @@ -221,12 +221,11 @@ static void TestExecutor(ShortestPathExecutorInfos& infos, ExecutionState state = ExecutionState::HASMORE; auto outputBlockShell = std::make_unique(itemBlockManager, std::move(block)); - - OutputAqlItemRow result(std::move(outputBlockShell), infos.getOutputRegisters(), - infos.registersToKeep(), infos.registersToClear()); - FakePathFinder& finder = static_cast(infos.finder()); + auto& finder = dynamic_cast(infos.finder()); WHEN("not waiting") { SingleRowFetcherHelper fetcher(input->steal(), false); + OutputAqlItemRow result(std::move(outputBlockShell), infos.getOutputRegisters(), + infos.registersToKeep(), infos.registersToClear()); ShortestPathExecutor testee(fetcher, infos); // Fetch fullPath for (size_t i = 0; i < resultPaths.size(); ++i) { @@ -253,6 +252,8 @@ static void TestExecutor(ShortestPathExecutorInfos& infos, } WHEN("waiting") { SingleRowFetcherHelper fetcher(input->steal(), true); + OutputAqlItemRow result(std::move(outputBlockShell), infos.getOutputRegisters(), + infos.registersToKeep(), infos.registersToClear()); ShortestPathExecutor testee(fetcher, infos); // Fetch fullPath for (size_t i = 0; i < resultPaths.size(); ++i) {