martinzink commented on a change in pull request #1152:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1152#discussion_r816868248



##########
File path: libminifi/test/SingleInputTestController.h
##########
@@ -34,9 +34,11 @@ class SingleInputTestController : public TestController {
   {}
 
   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);
+  trigger(const std::optional<std::string_view> input_flow_file_content, 
std::unordered_map<std::string, std::string> input_flow_file_attributes = {}) {
+    if (input_flow_file_content) {

Review comment:
       My bad, I thought the SingleInput referenced that there is a single 
incoming connection(which can be empty) and not that there is a single input 
flowfile.
   
   Looking at the code the main feature seems to be there is a single 
processors in the flow which's connections are made available for testing and 
not really the number of input flowfiles, how about I rename it to 
`SingleProcessorTestController` something like this 
https://github.com/apache/nifi-minifi-cpp/pull/1152/commits/4048d55e52833862a4b49da97e8135f02e9db4e4?
   
   What do you think? 




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