szaszm commented on a change in pull request #605: MINIFICPP-550 - Implement 
RocksDB controller service and component st…
URL: https://github.com/apache/nifi-minifi-cpp/pull/605#discussion_r366362750
 
 

 ##########
 File path: libminifi/test/integration/IntegrationBase.h
 ##########
 @@ -109,6 +110,16 @@ void IntegrationBase::run(std::string test_file_location) 
{
 
   core::YamlConfiguration yaml_config(test_repo, test_repo, content_repo, 
stream_factory, configuration, test_file_location);
 
+  auto controller_service_provider = yaml_ptr->getControllerServiceProvider();
+  std::string state_dir_name_template = "/tmp/integrationstate.XXXXXX";
+  std::vector<char> state_dir_buf(state_dir_name_template.c_str(),
+                                  state_dir_name_template.c_str() + 
state_dir_name_template.size() + 1);
+  if (mkdtemp(state_dir_buf.data()) == nullptr) {
+    throw std::runtime_error("Failed to create temporary directory for state");
+  }
+  state_dir = state_dir_buf.data();
 
 Review comment:
   duplicate code, consider extracting to a function

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to