szaszm commented on a change in pull request #1141:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1141#discussion_r679166402



##########
File path: extensions/standard-processors/tests/unit/HashContentTest.cpp
##########
@@ -149,17 +149,31 @@ TEST_CASE("TestingFailOnEmptyProperty", 
"[HashContentPropertiesCheck]") {
                                                                      
core::Relationship("success", "description"), true);
   plan->setProperty(md5processor, 
org::apache::nifi::minifi::processors::HashContent::HashAttribute.getName(), 
MD5_ATTR);
   plan->setProperty(md5processor, 
org::apache::nifi::minifi::processors::HashContent::HashAlgorithm.getName(), 
"MD5");
-  plan->setProperty(md5processor, 
org::apache::nifi::minifi::processors::HashContent::FailOnEmpty.getName(), 
"true");
+  std::set<core::Relationship> relationships;
+  relationships.insert(core::Relationship("success", "description"));
+  relationships.insert(core::Relationship("failure", "description"));
+  md5processor->setAutoTerminatedRelationships(relationships);
 
   std::stringstream stream_dir;
   stream_dir << tempdir << utils::file::FileUtils::get_separator() << 
TEST_FILE;
   std::string test_file_path = stream_dir.str();
   std::ofstream test_file(test_file_path, std::ios::binary);
 
+  SECTION("with an empty file and fail on empty property set to false") {
+  plan->setProperty(md5processor, 
org::apache::nifi::minifi::processors::HashContent::FailOnEmpty.getName(), 
"false");
+
   plan->runNextProcessor();
   plan->runNextProcessor();
 
-  REQUIRE(LogTestController::getInstance().contains("Failure as flow file is 
empty"));
-}
+  REQUIRE(LogTestController::getInstance().contains("attempting read"));

Review comment:
       Now that this is reverted, the indentation is wrong again.




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