-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Verify socket passing in hot restart test #805
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
3d9d0c0
Verify socket passing in hot restart test
hennna 425b31e
Merge 'upstream/master' into socket-passing
hennna f0e57fb
Add std libraries
hennna 11067f5
Response to comments
hennna 8a71a3e
Merg 'upstream/master' into socket-passing
hennna 6aca509
Fixes
hennna 47d4759
Merge 'upstream/master' into socket-passing
hennna ad79a14
Response to comments
hennna ef715c0
Merge 'upstream/master' into socket-passing
hennna 1c04a2b
Response to comments
hennna 8b7d3d5
Fix
hennna 2504035
Merge branch 'upstream/master' into socket-passing
hennna e6e4b59
Fix asan heap-use-after-free
hennna 1620325
Respone to comments
hennna File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| #include "envoy/http/header_map.h" | ||
|
|
||
| #include "common/json/json_loader.h" | ||
|
|
||
| #include "test/integration/integration_test.h" | ||
| #include "test/integration/utility.h" | ||
|
|
||
|
|
@@ -122,6 +124,18 @@ TEST_F(IntegrationTest, Admin) { | |
| Http::CodecClient::Type::HTTP1); | ||
| EXPECT_TRUE(response->complete()); | ||
| EXPECT_STREQ("200", response->headers().Status()->value().c_str()); | ||
|
|
||
| response = IntegrationUtil::makeSingleRequest(lookupPort("admin"), "GET", "/listeners", "", | ||
| Http::CodecClient::Type::HTTP1); | ||
| EXPECT_TRUE(response->complete()); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we validate it returned the right list of addresses here? |
||
| EXPECT_STREQ("200", response->headers().Status()->value().c_str()); | ||
|
|
||
| Json::ObjectPtr json = Json::Factory::LoadFromString(response->body()); | ||
| std::vector<Json::ObjectPtr> listener_info = json->asObjectArray(); | ||
| for (std::size_t index = 0; index < listener_info.size(); index++) { | ||
| EXPECT_EQ(test_server_->server().getListenSocketByIndex(index)->localAddress()->asString(), | ||
| listener_info[index]->asString()); | ||
| } | ||
| } | ||
|
|
||
| // Successful call to startProfiler requires tcmalloc. | ||
|
|
||
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
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
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
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
Oops, something went wrong.
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.
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.
As an aside, looks like
LoadFromStringand peers violate the coding style in their naming. A distinct cleanup PR might be nice to make this file consistent.