Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(function_test): use test_util to reduce duplicate code #1169

Merged
merged 1 commit into from
Sep 25, 2022

Conversation

acelyc111
Copy link
Member

@acelyc111 acelyc111 commented Sep 22, 2022

#1166

This is a flow up to #1149, now refactoring these function tests to inherit from test_util to reduce duplicate code.
And also include some other non-functional refactors.

@acelyc111 acelyc111 changed the title refacor(function_test): use test_util to reduce duplicate code refactor(function_test): use test_util to reduce duplicate code Sep 22, 2022
@acelyc111 acelyc111 marked this pull request as ready for review September 23, 2022 03:28
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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, it's better to reduce the usage of raw pointer. Using std::string instead is a better choice.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@acelyc111 acelyc111 merged commit b83e53b into apache:master Sep 25, 2022
@empiredan empiredan mentioned this pull request Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants