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


##########
libminifi/test/SingleProcessorTestController.h:
##########
@@ -28,16 +28,13 @@
 #include "core/Processor.h"
 
 namespace org::apache::nifi::minifi::test {
-class SingleInputTestController : public TestController {
+class SingleProcessorTestController : public TestController {
  public:
-  explicit SingleInputTestController(const std::shared_ptr<core::Processor>& 
processor)
+  explicit SingleProcessorTestController(const 
std::shared_ptr<core::Processor>& processor)
       : processor_{plan->addProcessor(processor, processor->getName())}
   {}
 
-  std::unordered_map<core::Relationship, 
std::vector<std::shared_ptr<core::FlowFile>>>
-  trigger(const std::string_view input_flow_file_content, 
std::unordered_map<std::string, std::string> input_flow_file_attributes = {}) {
-    const auto new_flow_file = createFlowFile(input_flow_file_content, 
std::move(input_flow_file_attributes));
-    input_->put(new_flow_file);
+  auto trigger() {

Review Comment:
   I want to keep the old abstraction, which keeps the interface similar to a 
transform function. We can have multiple trigger overloads instead, so the 
transform signature can be used for transform processors and the emitter 
signature for source processors. I think it would be nice if calls would only 
have side effects inside the processor, and only if the processor itself is 
stateful. `enqueueFlowFile` doesn't fulfill that.



-- 
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