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


##########
extensions/standard-processors/tests/unit/ConfigurationTests.cpp:
##########
@@ -53,4 +54,130 @@ TEST_CASE("Configuration can validate values to be assigned 
to specific properti
   REQUIRE(Configuration::validatePropertyValue("random.property", 
"random_value"));
 }
 
+TEST_CASE("Configuration can fix misconfigured timeperiod<->integer validated 
properties") {
+  LogTestController::getInstance().setInfo<minifi::Configure>();
+  LogTestController::getInstance().setInfo<minifi::Properties>();
+
+  auto properties_path = std::filesystem::temp_directory_path() /  
"test.properties";
+
+  {
+    std::ofstream properties_file(properties_path);
+    properties_file << "nifi.c2.agent.heartbeat.period=1min" << std::endl;
+    properties_file << "nifi.administrative.yield.duration=30000" << std::endl;
+    properties_file.close();
+  }

Review Comment:
   ```suggestion
     std::ofstream{properties_path}
         << "nifi.c2.agent.heartbeat.period=1min\n"
         << "nifi.administrative.yield.duration=30000\n";
   ```



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