You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "szaszm (via GitHub)" <gi...@apache.org> on 2024/10/21 14:43:23 UTC

Re: [PR] MINIFICPP-2377 Support process group level controller services [nifi-minifi-cpp]

szaszm commented on code in PR #1840:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1840#discussion_r1808965007


##########
libminifi/test/libtest/unit/SingleProcessorTestController.h:
##########
@@ -52,25 +61,17 @@ class SingleProcessorTestController : public TestController {
 
   core::Relationship addDynamicRelationship(std::string name);
 
- private:
-  std::shared_ptr<core::FlowFile> createFlowFile(const std::string_view content, std::unordered_map<std::string, std::string> attributes);
+  template<typename T = core::Processor>
+  T* getProcessor() const { return static_cast<T*>(processor_); }

Review Comment:
   I don't like the idea of complicating TestBase or TestController to mirror the god class complexity of FlowController. I would rather keep the process groups and the processor ownership outside of that, in the test case scopes, if that's feasible.



-- 
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-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org