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/05/15 15:52:31 UTC

[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #786: MINIFICPP-1225 - Fix flaky HTTP tests.

szaszm commented on a change in pull request #786:
URL: https://github.com/apache/nifi-minifi-cpp/pull/786#discussion_r425851554



##########
File path: libminifi/include/io/CRCStream.h
##########
@@ -145,17 +145,15 @@ class CRCStream : public BaseStream {
  protected:
 
   /**
-   * Creates a vector and returns the vector using the provided
-   * type name.
+   * Populates the vector using the provided type name.
+   * @param buf output buffer
    * @param t incoming object
-   * @returns vector.
+   * @returns number of bytes read.
    */
   template<typename K>
-  std::vector<uint8_t> readBuffer(const K& t) {
-    std::vector<uint8_t> buf;
+  int readBuffer(std::vector<uint8_t>& buf, const K& t) {

Review comment:
       While I agree with your change, this breaks libminifi API. We could consider providing an overload with error handling or modify the original to throw in case of an error, instead of returning an error code.

##########
File path: extensions/http-curl/tests/VerifyInvokeHTTPTest.cpp
##########
@@ -138,10 +138,10 @@ class VerifyRWTimeoutInvokeHTTP : public VerifyInvokeHTTP {
 };
 
 void run(VerifyInvokeHTTP& harness,
-    const std::string& url,
-    const std::string& test_file_location,
-    const std::string& key_dir,
-    CivetHandler * handler) {
+         const std::string& url,
+         const std::string& test_file_location,
+         const std::string& key_dir,
+         ServerAwareHandler * handler) {

Review comment:
       The previous continuation indentation of 2 levels (i.e. 4 spaces) was correct.




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