You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pegasus.apache.org by GitBox <gi...@apache.org> on 2022/09/23 09:56:44 UTC

[GitHub] [incubator-pegasus] acelyc111 commented on a diff in pull request #1169: refactor(function_test): use test_util to reduce duplicate code

acelyc111 commented on code in PR #1169:
URL: https://github.com/apache/incubator-pegasus/pull/1169#discussion_r978467871


##########
src/test/function_test/utils/utils.h:
##########
@@ -201,3 +202,15 @@ inline void compare(const T &expect, const U &actual)
         ASSERT_NO_FATAL_FAILURE(compare(it1->second, it2->second, it1->first));
     }
 }
+
+inline void run_cmd(const std::string &cmd, std::string *output = nullptr)
+{
+    std::stringstream ss;
+    int ret = dsn::utils::pipe_execute(cmd.c_str(), ss);

Review Comment:
   Agree, we can refactor functions like `pipe_execute ` in another patch, this patch only refactor function tests.



-- 
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: dev-unsubscribe@pegasus.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org