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

test: split tcp_proxy test into config test and data test #15067

Merged
merged 7 commits into from
Mar 2, 2021

Conversation

lambdai
Copy link
Contributor

@lambdai lambdai commented Feb 16, 2021

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:]

@junr03
Copy link
Member

junr03 commented Feb 17, 2021

@venilnoronha do you mind taking a first pass?

venilnoronha
venilnoronha previously approved these changes Feb 25, 2021
Copy link
Member

@venilnoronha venilnoronha left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@lambdai
Copy link
Contributor Author

lambdai commented Feb 27, 2021

@envoyproxy/senior-maintainers

@lambdai
Copy link
Contributor Author

lambdai commented Feb 27, 2021

Thank you @venilnoronha IIUC the next step is to be reviewed by a senior maintainer :)

Copy link
Contributor

@ggreenway ggreenway left a 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

srcs = ["tcp_proxy_test.cc"],
envoy_cc_test_library(
name = "tcp_proxy_test_base",
srcs = [
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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]>
@mattklein123 mattklein123 merged commit abba6e4 into envoyproxy:main Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants