-
Notifications
You must be signed in to change notification settings - Fork 84
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
Cloned QuicTestServer #1989
Cloned QuicTestServer #1989
Conversation
Signed-off-by: Chidera Olibie <[email protected]>
Signed-off-by: Chidera Olibie <[email protected]>
Signed-off-by: Chidera Olibie <[email protected]>
Signed-off-by: Chidera Olibie <[email protected]>
Signed-off-by: Chidera Olibie <[email protected]>
Signed-off-by: Chidera Olibie <[email protected]>
…TestServer Signed-off-by: Chidera Olibie <[email protected]>
…TestServer Signed-off-by: Chidera Olibie <[email protected]>
Signed-off-by: Chidera Olibie <[email protected]>
Signed-off-by: Chidera Olibie <[email protected]>
Signed-off-by: Chidera Olibie <[email protected]>
Signed-off-by: Chidera Olibie <[email protected]>
Signed-off-by: Chidera Olibie <[email protected]>
Signed-off-by: Chidera Olibie <[email protected]>
Signed-off-by: Chidera Olibie <[email protected]>
…TestServer Signed-off-by: Chidera Olibie <[email protected]>
Signed-off-by: Chidera Olibie <[email protected]>
Signed-off-by: Chidera Olibie <[email protected]>
Signed-off-by: Chidera Olibie <[email protected]>
Signed-off-by: Chidera Olibie <[email protected]>
Signed-off-by: Chidera Olibie <[email protected]>
Signed-off-by: Chidera Olibie <[email protected]>
Signed-off-by: Chidera Olibie <[email protected]>
Signed-off-by: Chidera Olibie <[email protected]>
Signed-off-by: Chidera Olibie <[email protected]>
Signed-off-by: Chidera Olibie <[email protected]>
Signed-off-by: Chidera Olibie <[email protected]>
Signed-off-by: Charles Le Borgne <[email protected]>
Signed-off-by: Charles Le Borgne <[email protected]>
Signed-off-by: Charles Le Borgne <[email protected]>
Signed-off-by: Charles Le Borgne <[email protected]>
Signed-off-by: Charles Le Borgne <[email protected]>
Signed-off-by: Charles Le Borgne <[email protected]>
Signed-off-by: Charles Le Borgne <[email protected]>
Signed-off-by: Charles Le Borgne <[email protected]>
If you're seeing port binding issues on Mac this is probably due to the fact that it's running on a sandbox without network by default. Just do what other tests do: envoy-mobile/test/kotlin/integration/BUILD Line 121 in 4710ef4
|
Signed-off-by: Charles Le Borgne <[email protected]>
Signed-off-by: Charles Le Borgne <[email protected]>
Signed-off-by: Charles Le Borgne <[email protected]>
test/java/io/envoyproxy/envoymobile/engine/testing/QuicTestServerTest.java
Show resolved
Hide resolved
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.
Awesome. So happy this finally works.
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.
Nice! This looks great. A few comments, mostly around comments.
// end pre-setup | ||
|
||
upstream_config_.upstream_protocol_ = Http::CodecType::HTTP3; | ||
upstream_config_.udp_fake_upstream_ = FakeUpstreamConfig::UdpConfig(); |
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.
nit: Could these both be done in the constructor since they don't seem to change per start()?
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 moved line 49, but kept line 48: the upstream_protocol will become a parameter soon. the goal is to also use this server to H2 also. Some renaming will take place later.
extern "C" { // functions | ||
#endif | ||
|
||
void start_server(); |
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.
nit: Should we have brief comments for these methods?
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.
Done
ON_CALL(factory_context_, scope()).WillByDefault(testing::ReturnRef(stats_store_)); | ||
} | ||
|
||
void QuicTestServer::startQuicTestServer() { |
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.
Should this perhaps ASSERT(!upstream_)?
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.
Done
ENVOY_LOG_MISC(debug, "Upstream now listening on {}", upstream_->localAddress()->asString()); | ||
} | ||
|
||
void QuicTestServer::shutdownQuicTestServer() { upstream_.reset(); } |
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.
Should this ASSERT(upstream_)?
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.
Done
public: | ||
QuicTestServer(); | ||
|
||
void startQuicTestServer(); |
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.
Brief comments here would be nice.
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.
Done
private static final AtomicBoolean sServerRunning = new AtomicBoolean(); | ||
|
||
/* | ||
* Starts the server. |
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.
Comment what happens if the server is already running?
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.
Done
|
||
public static final String getServerCertKey() { return KEY_USED; } | ||
|
||
public static long createMockCertVerifier() { |
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.
Out of curiosity, what does the return value represent?
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.
IDK - removed :-)
Signed-off-by: Charles Le Borgne <[email protected]>
Signed-off-by: Charles Le Borgne <[email protected]>
Signed-off-by: Charles Le Borgne <[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 great to me! Thanks for doing this.
* origin/main: (21 commits) owners: adding charles (envoyproxy#2038) [OWNERS] Update Envoy Mobile owners (envoyproxy#2031) [deps] Update rules_android to a stable release URL (envoyproxy#2032) [json] Remove com_github_nlohmann_json override & patch (envoyproxy#2030) Enable the "received byte count" feature. (envoyproxy#2004) Run Kotlin macOS tests without EngFlow (envoyproxy#2018) final_intel: adding response flags (envoyproxy#2009) fix (envoyproxy#2025) stream intel: update kotlin public interface to align with swift (envoyproxy#2013) tls: update bundled root certificates (envoyproxy#2016) tooling: first pass at oncall tooling (envoyproxy#2014) test: Solve CI flakiness for test/java/org/chromium/net/urlconnection:urlconnection_test (envoyproxy#2007) envoy: 519774f742 (envoyproxy#2015) Default timestamp to -1 for envoy_final_stream_intel (envoyproxy#2006) QuicTestServer (envoyproxy#1989) bump boringssl to Envoy's version (envoyproxy#1999) docs: addding release notes (envoyproxy#2001) release: cutting the 0.4.5 release (envoyproxy#2000) Revert "bazel: change bazelisk for M1 support (envoyproxy#1966)" (envoyproxy#1998) Decompress even when `no-transform` is specified (envoyproxy#1995) ... Signed-off-by: JP Simard <[email protected]>
This PR was authored by colibie at 95%
Description: copy of pr/1870 authored by colibie where missing bits were added
Risk Level: N/A
Testing: test added
Docs Changes: N/A
Release Notes: N/A
Signed-off-by: Charles Le Borgne [email protected]