dfp: adding connection timing test#19766
Merged
alyssawilk merged 3 commits intoenvoyproxy:mainfrom Feb 2, 2022
Merged
Conversation
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
| "\n", cache_file_value_contents_)); | ||
| } | ||
| } | ||
| void testConnectionTiming(IntegrationStreamDecoderPtr& response, bool cached_dns, |
Contributor
There was a problem hiding this comment.
nit: newline before?
| const std::string& override_auto_sni_header = "") { | ||
| setUpstreamProtocol(Http::CodecType::HTTP1); | ||
| const std::string filename = TestEnvironment::temporaryPath("dns_cache.txt"); | ||
| ::unlink(filename.c_str()); |
Contributor
There was a problem hiding this comment.
Out of curiosity, with your new O_TRUNC writes, is this still required?
Contributor
Author
There was a problem hiding this comment.
I think so - not all the tests write the file and the file shouldnt exist in the tests which don't use one
| ASSERT_LE(handshake_end, request_send_end); | ||
| ASSERT_LE(request_send_end, response_begin); | ||
| ASSERT_LT(handshake_end, timeSystem().monotonicTime().time_since_epoch().count()); | ||
| ASSERT_EQ(now, time.time_since_epoch().count()); |
Contributor
There was a problem hiding this comment.
Is this guaranteed to be true since some time will have elapsed between line 182 and here?
Contributor
Author
There was a problem hiding this comment.
oh sorry, that was me testing my understanding of monotonic time when I was debugging out of order times. Because it's latched, it shouldn't change as time passes. But now that I've verified I understand it I can remove that.
RyanTheOptimist
approved these changes
Feb 1, 2022
joshperry
pushed a commit
to joshperry/envoy
that referenced
this pull request
Feb 13, 2022
Part of envoyproxy/envoy-mobile#1520 Signed-off-by: Alyssa Wilk <alyssar@chromium.org> Signed-off-by: Josh Perry <josh.perry@mx.com>
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.
Part of envoyproxy/envoy-mobile#1520