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:53:53 UTC

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

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


##########
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:
   In my opinion, it's better to reduce the usage of raw pointer. Using std::string instead is a better choice.



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