adamdebreceni commented on code in PR #1987:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1987#discussion_r2556652958


##########
core-framework/src/utils/file/FileUtils.cpp:
##########
@@ -71,6 +71,33 @@ bool contains(const std::filesystem::path& file_path, 
std::string_view text_to_s
   return std::search(view.begin(), view.end(), searcher) != view.end();
 }
 
+// finds a string of length at most @max_length with a given @prefix
+std::optional<std::string> find(const std::filesystem::path& file_path, 
std::string_view prefix, size_t max_length) {

Review Comment:
   split it, and added tests



##########
extensions/llamacpp/tests/RunLlamaCppInferenceTests.cpp:
##########
@@ -224,13 +227,14 @@ TEST_CASE("Invalid values for optional double type 
properties throw exception")
     property_name = processors::RunLlamaCppInference::MinP.name;
   }
 
-  
REQUIRE_THROWS_WITH(controller.trigger(minifi::test::InputFlowFileData{.content 
= "42", .attributes = {}}),
-      fmt::format("Expected parsable float from RunLlamaCppInference::{}, but 
got GeneralParsingError (Parsing Error:0)", property_name));
+  REQUIRE_THROWS(controller.trigger(minifi::test::InputFlowFileData{.content = 
"42", .attributes = {}}));
+  CHECK(minifi::test::utils::verifyLogLinePresenceInPollTime(1s,
+      fmt::format("Expected parsable float from RunLlamaCppInference::{}, but 
got GeneralParsingError (Parsing Error:0)", property_name)));
 }
-
+//

Review Comment:
   removed



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