fgerlits commented on code in PR #1771: URL: https://github.com/apache/nifi-minifi-cpp/pull/1771#discussion_r1608107786
########## extensions/http-curl/tests/ControllerServiceIntegrationTests.cpp: ########## @@ -90,31 +89,30 @@ int main(int argc, char **argv) { }); auto pg = yaml_config.getRoot(); - auto provider = std::make_shared<core::controller::StandardControllerServiceProvider>(map, std::make_shared<minifi::Configure>()); - std::shared_ptr<core::controller::ControllerServiceNode> mockNode = pg->findControllerService("MockItLikeIts1995"); + auto provider = std::make_shared<core::controller::StandardControllerServiceProvider>(std::make_unique<core::controller::ControllerServiceNodeMap>(), std::make_shared<minifi::Configure>()); + auto* mockNode = pg->findControllerService("MockItLikeIts1995"); assert(mockNode != nullptr); mockNode->enable(); - std::vector<std::shared_ptr<core::controller::ControllerServiceNode> > linkedNodes = mockNode->getLinkedControllerServices(); + std::vector<core::controller::ControllerServiceNode*> linkedNodes = mockNode->getLinkedControllerServices(); assert(linkedNodes.size() == 1); - std::shared_ptr<core::controller::ControllerServiceNode> notexistNode = pg->findControllerService("MockItLikeItsWrong"); + core::controller::ControllerServiceNode* notexistNode = pg->findControllerService("MockItLikeItsWrong"); assert(notexistNode == nullptr); - std::shared_ptr<core::controller::ControllerServiceNode> ssl_client_cont = nullptr; - std::shared_ptr<minifi::controllers::SSLContextService> ssl_client = nullptr; + std::shared_ptr<minifi::controllers::SSLContextService> ssl_client; { std::lock_guard<std::mutex> lock(control_mutex); controller->load(); controller->start(); - ssl_client_cont = controller->getControllerServiceNode("SSLClientServiceTest"); - ssl_client_cont->enable(); - assert(ssl_client_cont != nullptr); - assert(ssl_client_cont->getControllerServiceImplementation() != nullptr); - ssl_client = std::static_pointer_cast<minifi::controllers::SSLContextService>(ssl_client_cont->getControllerServiceImplementation()); + auto* ssl_client_node = controller->getControllerServiceNode("SSLClientServiceTest"); + ssl_client_node->enable(); + assert(ssl_client_node != nullptr); Review Comment: yes, good catch -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org