szaszm commented on a change in pull request #1152: URL: https://github.com/apache/nifi-minifi-cpp/pull/1152#discussion_r812108833
########## File path: extensions/procfs/CMakeLists.txt ########## @@ -0,0 +1,33 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +include(${CMAKE_SOURCE_DIR}/extensions/ExtensionHeader.txt) + +file(GLOB SOURCES "*.cpp" "processors/*.cpp" "utils/*.cpp" "procfs_classes/*.cpp") + +add_library(minifi-procfs SHARED ${SOURCES}) + +target_include_directories(minifi-procfs BEFORE PRIVATE processors) +target_include_directories(minifi-procfs BEFORE PRIVATE procfs_classes) Review comment: Leaving random classes in the extension root directory is fine in my books, no need for "procfs_classes", but if you like it better, I think it doesn't hurt either. I follow the namespaces by default. ########## 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: `SingleInputTestController` was not designed to be used without an input. (It's in the name.) If you want to reuse it without an input, please refactor it to extract and customize the input generation part. -- 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]
