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 2022/10/28 12:33:11 UTC

[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a diff in pull request #1435: MINIFICPP-1959 - Avoid dangling content references when using VolatileFlowFileRepository

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


##########
libminifi/test/unit/ProcessSessionTests.cpp:
##########
@@ -126,3 +132,44 @@ TEST_CASE("ProcessSession::read can read zero length flowfiles without crash", "
   ContentRepositoryDependentTests::testReadFromZeroLengthFlowFile(std::make_shared<core::repository::VolatileContentRepository>());
   ContentRepositoryDependentTests::testReadFromZeroLengthFlowFile(std::make_shared<core::repository::FileSystemRepository>());
 }
+
+struct VolatileFlowFileRepositoryTestAccessor {
+  METHOD_ACCESSOR(flush);
+};
+
+class TestVolatileFlowFileRepository : public core::repository::VolatileFlowFileRepository {
+ public:
+  explicit TestVolatileFlowFileRepository(std::string name) : core::SerializableComponent(std::move(name)) {}

Review Comment:
   `SerializableComponent` is a virtual base class without default initializer, so we have to directly initialize it in every derived class



-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org