adamdebreceni commented on a change in pull request #788: URL: https://github.com/apache/nifi-minifi-cpp/pull/788#discussion_r428713559
########## File path: libminifi/test/archive-tests/CompressContentTests.cpp ########## @@ -91,851 +91,826 @@ class ReadCallback: public org::apache::nifi::minifi::InputStreamCallback { int archive_buffer_size_; }; -TEST_CASE("CompressFileGZip", "[compressfiletest1]") { - try { - std::ofstream expectfile; - expectfile.open(EXPECT_COMPRESS_CONTENT); +class CompressDecompressionTestController : public TestController{ +protected: + static std::string tempDir; + static std::string raw_content_path; + static std::string compressed_content_path; + static TestController global_controller; +public: + class RawContent{ + std::string content_; + RawContent(std::string&& content_): content_(std::move(content_)) {} Review comment: done ########## File path: thirdparty/libarchive/libarchive.patch ########## @@ -114,3 +114,19 @@ diff -rupN orig/libarchive/archive_read_support_format_rar5.c patched/libarchive } return ARCHIVE_OK; +diff -rupN orig/CMakeLists.txt patched/CMakeLists.txt +--- orig/CMakeLists.txt 2020-05-20 12:05:26.929079900 +0200 ++++ patched/CMakeLists.txt 2020-05-20 12:06:39.394626800 +0200 +@@ -87,11 +87,7 @@ SET(CMAKE_REQUIRED_DEFINITIONS) + SET(CMAKE_REQUIRED_INCLUDES) + SET(CMAKE_REQUIRED_LIBRARIES) + SET(CMAKE_REQUIRED_FLAGS) +-if (CMAKE_BUILD_TYPE STREQUAL "Debug") +- OPTION(ENABLE_WERROR "Treat warnings as errors - default is ON for Debug, OFF otherwise." ON) +-else () +- OPTION(ENABLE_WERROR "Treat warnings as errors - default is ON for Debug, OFF otherwise." OFF) +-endif () ++SET(ENABLE_WERROR OFF) + + # Especially for early development, we want to be a little + # aggressive about diagnosing build problems; this can get Review comment: done ########## File path: libminifi/test/archive-tests/CompressContentTests.cpp ########## @@ -91,851 +91,826 @@ class ReadCallback: public org::apache::nifi::minifi::InputStreamCallback { int archive_buffer_size_; }; -TEST_CASE("CompressFileGZip", "[compressfiletest1]") { - try { - std::ofstream expectfile; - expectfile.open(EXPECT_COMPRESS_CONTENT); +class CompressDecompressionTestController : public TestController{ +protected: + static std::string tempDir; + static std::string raw_content_path; + static std::string compressed_content_path; + static TestController global_controller; +public: + class RawContent{ + std::string content_; + RawContent(std::string&& content_): content_(std::move(content_)) {} + friend class CompressDecompressionTestController; + public: + bool operator==(const std::string& actual) const noexcept { + return content_ == actual; + } + bool operator!=(const std::string& actual) const noexcept { + return content_ != actual; + } + }; - std::mt19937 gen(std::random_device { }()); + std::string rawContentPath() const { + return raw_content_path; + } + + std::string compressedPath() const { + return compressed_content_path; + } + + RawContent getRawContent() const {; Review comment: done ---------------------------------------------------------------- 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