Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

refactor: move load balance related tests under another test suite #365

Merged
merged 2 commits into from
Dec 24, 2019

Conversation

neverchanje
Copy link
Contributor

@neverchanje neverchanje commented Dec 21, 2019

I'm going to refactor the load balancing related tests and codes. This is the first step. I moved the simple_lb_xxx tests to meta_load_balance_test to make it clear.

My goal is to:

  1. Simplify simple_lb_balanced_cure, which consists of 600+ LOC.
  2. Make the codes of load balancer easier to read, both unit tests and implementation.

@@ -217,6 +216,7 @@ class meta_service : public serverlet<meta_service>
friend class meta_test_base;
friend class meta_duplication_service;
friend class meta_http_service_test;
friend class meta_load_balance_test;
Copy link
Member

Choose a reason for hiding this comment

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

单测的friend可以使用FRIEND_TEST(test_case_name, test_name) 宏,后面的重构来做吧

Copy link
Contributor

Choose a reason for hiding this comment

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

可以开个issue记一下

Copy link
Contributor Author

Choose a reason for hiding this comment

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

额,那就是每个 test 你都要写一个 FRIEND_TEST,其实你只需要一行 friend 就好了

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants