You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/08/04 09:16:10 UTC

[GitHub] [nifi-minifi-cpp] fgerlits commented on a change in pull request #857: MINIFICPP-1309 - RAII based resourceClaim management

fgerlits commented on a change in pull request #857:
URL: https://github.com/apache/nifi-minifi-cpp/pull/857#discussion_r464910752



##########
File path: libminifi/test/persistence-tests/PersistenceTests.cpp
##########
@@ -257,8 +258,26 @@ TEST_CASE("Persisted flowFiles are updated on modification", "[TestP1]") {
   config->set(minifi::Configure::nifi_flowfile_repository_directory_default, utils::file::FileUtils::concat_path(dir, "flowfile_repository"));
 
   std::shared_ptr<core::Repository> prov_repo = std::make_shared<TestRepository>();
-  std::shared_ptr<core::repository::FlowFileRepository> ff_repository = std::make_shared<core::repository::FlowFileRepository>("flowFileRepository");
-  std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::FileSystemRepository>();
+  std::shared_ptr<core::Repository> ff_repository;
+  std::shared_ptr<core::ContentRepository> content_repo;
+  SECTION("FlowFileRepository"){
+    ff_repository = std::make_shared<core::repository::FlowFileRepository>("flowFileRepository");
+    SECTION("VolatileContentRepository"){
+      content_repo = std::make_shared<core::repository::VolatileContentRepository>();
+    }
+    SECTION("FileSystemContenRepository"){
+      content_repo = std::make_shared<core::repository::FileSystemRepository>();
+    }
+  }
+  SECTION("VolatileFlowFileRepository"){
+    ff_repository = std::make_shared<core::repository::FlowFileRepository>("volatileFlowFileRepository");

Review comment:
       should this be an instance of `VolatileFlowFileRepository`?

##########
File path: libminifi/include/ResourceClaim.h
##########
@@ -47,6 +47,8 @@ extern void setDefaultDirectory(std::string);
 // ResourceClaim Class
 class ResourceClaim : public std::enable_shared_from_this<ResourceClaim> {

Review comment:
       is `enable_shared_from_this` still needed?

##########
File path: libminifi/test/persistence-tests/PersistenceTests.cpp
##########
@@ -257,8 +258,26 @@ TEST_CASE("Persisted flowFiles are updated on modification", "[TestP1]") {
   config->set(minifi::Configure::nifi_flowfile_repository_directory_default, utils::file::FileUtils::concat_path(dir, "flowfile_repository"));
 
   std::shared_ptr<core::Repository> prov_repo = std::make_shared<TestRepository>();
-  std::shared_ptr<core::repository::FlowFileRepository> ff_repository = std::make_shared<core::repository::FlowFileRepository>("flowFileRepository");
-  std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::FileSystemRepository>();
+  std::shared_ptr<core::Repository> ff_repository;
+  std::shared_ptr<core::ContentRepository> content_repo;
+  SECTION("FlowFileRepository"){
+    ff_repository = std::make_shared<core::repository::FlowFileRepository>("flowFileRepository");
+    SECTION("VolatileContentRepository"){
+      content_repo = std::make_shared<core::repository::VolatileContentRepository>();
+    }
+    SECTION("FileSystemContenRepository"){

Review comment:
       typo: `Conten` -> `Content` (or change to `FileSystemRepository`?) -- also in the other section




----------------------------------------------------------------
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:
users@infra.apache.org