test: Split huge monolith mock header to speed up test compilation#11649
test: Split huge monolith mock header to speed up test compilation#11649lizan merged 10 commits intoenvoyproxy:masterfrom
Conversation
Signed-off-by: Muge Chen <mugechen@google.com>
Signed-off-by: Muge Chen <mugechen@google.com>
Signed-off-by: Muge Chen <mugechen@google.com>
|
@asraa FYI |
ahedberg
left a comment
There was a problem hiding this comment.
Congrats on getting your first PR out for review!
Signed-off-by: Muge Chen <mugechen@google.com>
Signed-off-by: Muge Chen <mugechen@google.com>
Signed-off-by: Muge Chen <mugechen@google.com>
Signed-off-by: Muge Chen <mugechen@google.com>
|
The overall build time for cluster_manager_test has been further improved to 68.689s in my build cluster by removing superfluous includes in divided headers. |
test/mocks/server/admin.h
Outdated
| #include "gmock/gmock.h" | ||
| #include "spdlog/spdlog.h" | ||
|
|
||
| using testing::NiceMock; |
There was a problem hiding this comment.
Using-declarations should only be used in .cc files. See https://google.github.io/styleguide/cppguide.html#Namespaces
test/mocks/server/config_tracker.cc
Outdated
| #include "gmock/gmock.h" | ||
| #include "gtest/gtest.h" | ||
|
|
||
| using testing::_; |
There was a problem hiding this comment.
These should be moved to inside the innermost namespace, and they should be fully-qualified. See https://abseil.io/tips/119
Signed-off-by: Muge Chen <mugechen@google.com>
Signed-off-by: Muge Chen <mugechen@google.com>
|
Just a nit on the PR description, the comment |
|
@sunjayBhatia Thanks for your advice. Now the PR description has been adjusted to "Related Issues" |
…nvoyproxy#11649) Commit Message: Split huge monolith mock header to speed up test compilation Additional Description: `cluster_manager_test` only used a simple mock class `MockAdmin` from `test/mocks/server/mocks.h`, which is a huge mock library. After splitting, the overall build time for `cluster_manager_test` reduced from 143.481s to 82.443s in my build cluster. Risk Level: low Testing: existing tests Docs Changes: N/A Release Notes: no Related Issues: envoyproxy#10917 Signed-off-by: Muge Chen <mugechen@google.com> Signed-off-by: chaoqinli <chaoqinli@google.com>
…nvoyproxy#11649) Commit Message: Split huge monolith mock header to speed up test compilation Additional Description: `cluster_manager_test` only used a simple mock class `MockAdmin` from `test/mocks/server/mocks.h`, which is a huge mock library. After splitting, the overall build time for `cluster_manager_test` reduced from 143.481s to 82.443s in my build cluster. Risk Level: low Testing: existing tests Docs Changes: N/A Release Notes: no Related Issues: envoyproxy#10917 Signed-off-by: Muge Chen <mugechen@google.com>
…nvoyproxy#11649) Commit Message: Split huge monolith mock header to speed up test compilation Additional Description: `cluster_manager_test` only used a simple mock class `MockAdmin` from `test/mocks/server/mocks.h`, which is a huge mock library. After splitting, the overall build time for `cluster_manager_test` reduced from 143.481s to 82.443s in my build cluster. Risk Level: low Testing: existing tests Docs Changes: N/A Release Notes: no Related Issues: envoyproxy#10917 Signed-off-by: Muge Chen <mugechen@google.com> Signed-off-by: yashwant121 <yadavyashwant36@gmail.com>
Commit Message: Split huge monolith mock header to speed up test compilation
Additional Description:
cluster_manager_testonly used a simple mock classMockAdminfromtest/mocks/server/mocks.h, which is a huge mock library. After splitting, the overall build time forcluster_manager_testreduced from 143.481s to 82.443s in my build cluster.Risk Level: low
Testing: existing tests
Docs Changes: N/A
Release Notes: no
Related Issues: #10917