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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to