-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
test: split tcp_proxy test into config test and data test #15067
Conversation
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
@venilnoronha do you mind taking a first pass? |
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
@envoyproxy/senior-maintainers |
Thank you @venilnoronha IIUC the next step is to be reviewed by a senior maintainer :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is compiling the .h file into a lib. Maybe this should be hdrs
not srcs
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be hdrs
. Fixed and add the missing pragma once in this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
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:]