test: split tcp_proxy test into config test and data test#15067
Merged
mattklein123 merged 7 commits intoenvoyproxy:mainfrom Mar 2, 2021
Merged
test: split tcp_proxy test into config test and data test#15067mattklein123 merged 7 commits intoenvoyproxy:mainfrom
mattklein123 merged 7 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Member
|
@venilnoronha do you mind taking a first pass? |
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Contributor
Author
|
@envoyproxy/senior-maintainers |
Contributor
Author
|
Thank you @venilnoronha IIUC the next step is to be reviewed by a senior maintainer :) |
ggreenway
requested changes
Mar 2, 2021
Member
ggreenway
left a comment
There was a problem hiding this comment.
Splitting config vs proxy tests makes sense to me.
/wait
test/common/tcp_proxy/BUILD
Outdated
| srcs = ["tcp_proxy_test.cc"], | ||
| envoy_cc_test_library( | ||
| name = "tcp_proxy_test_base", | ||
| srcs = [ |
Member
There was a problem hiding this comment.
I think this is compiling the .h file into a lib. Maybe this should be hdrs not srcs?
Contributor
Author
There was a problem hiding this comment.
This should be hdrs. Fixed and add the missing pragma once in this file.
Contributor
Author
There was a problem hiding this comment.
For cc_library rules, headers in hdrs comprise the public interface of the library and can be directly included both from the files in hdrs and srcs of the library itself as well as from files in hdrs and srcs of cc_* rules that list the library in their deps. Headers in srcs must only be directly included from the files in hdrs and srcs of the library itself.
tcp_proxy_base.h should be in hdrs because it is explicitly included the envoy_cc_test target. It's interesting there was no error reported by bazel before the fix.
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
ggreenway
approved these changes
Mar 2, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit Message:
Split from #15053 that will introduce another group of tcp proxy test cases.
tcp_proxy_test.cc line drop from 2206 to 1036.
tcp_proxy_test compile time drop from 110s to 93s.
The test gain a little bit of parallelism by running independently
tcp_proxy_test: 16s
config_test: 8s
The overall
bazel test //test/...slightly increased because we are generating 2 test binaries tcp_proxy_test and config_test.Additional Description:
Risk Level: LOW
Testing: pure test refactor
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]
[Optional API Considerations:]