{"action":"created","comment":{"url":"https://api.github.com/repos/lyft/envoy/pulls/comments/107958625","pull_request_review_id":28965535,"id":107958625,"diff_hunk":"@@ -117,8 +123,27 @@ TEST(Ipv4InstanceTest, BadAddress) {\n \n TEST(Ipv4InstanceTest, SocketBindAndConnect) {\n   // Test listening on and connecting to an unused port on the IPv4 loopback address.\n-  Ipv4Instance loopbackPort(\"127.0.0.1\", ::Network::Test::getUnusedPort());\n-  testSocketBindAndConnect(loopbackPort);\n+  testSocketBindAndConnect(\"127.0.0.1:0\");\n+}\n+\n+TEST(Ipv4InstanceTest, ParseInternetAddressAndPort) {\n+  EXPECT_EQ(nullptr, parseInternetAddressAndPort(\"1.2.3.4\"));\n+  EXPECT_EQ(nullptr, parseInternetAddressAndPort(\"1.2.3.4:\"));\n+  EXPECT_EQ(nullptr, parseInternetAddressAndPort(\"1.2.3.4::1\"));\n+  EXPECT_EQ(nullptr, parseInternetAddressAndPort(\"1.2.3.4:-1\"));\n+  EXPECT_EQ(nullptr, parseInternetAddressAndPort(\":1\"));\n+  EXPECT_EQ(nullptr, parseInternetAddressAndPort(\" :1\"));\n+  EXPECT_EQ(nullptr, parseInternetAddressAndPort(\"1.2.3:1\"));\n+  EXPECT_EQ(nullptr, parseInternetAddressAndPort(\"1.2.3.4]:2\"));\n+  EXPECT_EQ(nullptr, parseInternetAddressAndPort(\"1.2.3.4:65536\"));\n+\n+  auto ptr = parseInternetAddressAndPort(\"0.0.0.0:0\");\n+  ASSERT_FALSE(ptr == nullptr);","path":"test/common/network/address_impl_test.cc","position":71,"original_position":71,"commit_id":"02501ec4b2c5f61415d553fa45a62ea866dde2ae","original_commit_id":"02501ec4b2c5f61415d553fa45a62ea866dde2ae","user":{"login":"htuch","id":10914751,"avatar_url":"https://avatars2.githubusercontent.com/u/10914751?v=3","gravatar_id":"","url":"https://api.github.com/users/htuch","html_url":"https://github.com/htuch","followers_url":"https://api.github.com/users/htuch/followers","following_url":"https://api.github.com/users/htuch/following{/other_user}","gists_url":"https://api.github.com/users/htuch/gists{/gist_id}","starred_url":"https://api.github.com/users/htuch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htuch/subscriptions","organizations_url":"https://api.github.com/users/htuch/orgs","repos_url":"https://api.github.com/users/htuch/repos","events_url":"https://api.github.com/users/htuch/events{/privacy}","received_events_url":"https://api.github.com/users/htuch/received_events","type":"User","site_admin":false},"body":"Nit: another ASSERT_NE","created_at":"2017-03-24T17:32:24Z","updated_at":"2017-03-24T17:33:31Z","html_url":"https://github.com/lyft/envoy/pull/588#discussion_r107958625","pull_request_url":"https://api.github.com/repos/lyft/envoy/pulls/588","_links":{"self":{"href":"https://api.github.com/repos/lyft/envoy/pulls/comments/107958625"},"html":{"href":"https://github.com/lyft/envoy/pull/588#discussion_r107958625"},"pull_request":{"href":"https://api.github.com/repos/lyft/envoy/pulls/588"}}},"pull_request":{"url":"https://api.github.com/repos/lyft/envoy/pulls/588","id":111468626,"html_url":"https://github.com/lyft/envoy/pull/588","diff_url":"https://github.com/lyft/envoy/pull/588.diff","patch_url":"https://github.com/lyft/envoy/pull/588.patch","issue_url":"https://api.github.com/repos/lyft/envoy/issues/588","number":588,"state":"open","locked":false,"title":"Add test utility for picking an unused port","user":{"login":"jamessynge","id":1451603,"avatar_url":"https://avatars1.githubusercontent.com/u/1451603?v=3","gravatar_id":"","url":"https://api.github.com/users/jamessynge","html_url":"https://github.com/jamessynge","followers_url":"https://api.github.com/users/jamessynge/followers","following_url":"https://api.github.com/users/jamessynge/following{/other_user}","gists_url":"https://api.github.com/users/jamessynge/gists{/gist_id}","starred_url":"https://api.github.com/users/jamessynge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamessynge/subscriptions","organizations_url":"https://api.github.com/users/jamessynge/orgs","repos_url":"https://api.github.com/users/jamessynge/repos","events_url":"https://api.github.com/users/jamessynge/events{/privacy}","received_events_url":"https://api.github.com/users/jamessynge/received_events","type":"User","site_admin":false},"body":"Replace getUnusedPort, which didn't really do any checking, with checkPortAvailability, which actually does check that the port is available for a single protocol (IPv4 or IPv6) and a single stream type (Stream or Datagram).\r\n\r\nAddresses the concern in issue #574, but by a different means (still may want to have port server support).","created_at":"2017-03-19T21:24:29Z","updated_at":"2017-03-24T17:33:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0fe13b807ea0f1d91caaccb58d1634b7663f293a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/lyft/envoy/pulls/588/commits","review_comments_url":"https://api.github.com/repos/lyft/envoy/pulls/588/comments","review_comment_url":"https://api.github.com/repos/lyft/envoy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lyft/envoy/issues/588/comments","statuses_url":"https://api.github.com/repos/lyft/envoy/statuses/02501ec4b2c5f61415d553fa45a62ea866dde2ae","head":{"label":"jamessynge:test-port-availability","ref":"test-port-availability","sha":"02501ec4b2c5f61415d553fa45a62ea866dde2ae","user":{"login":"jamessynge","id":1451603,"avatar_url":"https://avatars1.githubusercontent.com/u/1451603?v=3","gravatar_id":"","url":"https://api.github.com/users/jamessynge","html_url":"https://github.com/jamessynge","followers_url":"https://api.github.com/users/jamessynge/followers","following_url":"https://api.github.com/users/jamessynge/following{/other_user}","gists_url":"https://api.github.com/users/jamessynge/gists{/gist_id}","starred_url":"https://api.github.com/users/jamessynge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamessynge/subscriptions","organizations_url":"https://api.github.com/users/jamessynge/orgs","repos_url":"https://api.github.com/users/jamessynge/repos","events_url":"https://api.github.com/users/jamessynge/events{/privacy}","received_events_url":"https://api.github.com/users/jamessynge/received_events","type":"User","site_admin":false},"repo":{"id":81367501,"name":"envoy","full_name":"jamessynge/envoy","owner":{"login":"jamessynge","id":1451603,"avatar_url":"https://avatars1.githubusercontent.com/u/1451603?v=3","gravatar_id":"","url":"https://api.github.com/users/jamessynge","html_url":"https://github.com/jamessynge","followers_url":"https://api.github.com/users/jamessynge/followers","following_url":"https://api.github.com/users/jamessynge/following{/other_user}","gists_url":"https://api.github.com/users/jamessynge/gists{/gist_id}","starred_url":"https://api.github.com/users/jamessynge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamessynge/subscriptions","organizations_url":"https://api.github.com/users/jamessynge/orgs","repos_url":"https://api.github.com/users/jamessynge/repos","events_url":"https://api.github.com/users/jamessynge/events{/privacy}","received_events_url":"https://api.github.com/users/jamessynge/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jamessynge/envoy","description":"C++ front/service proxy","fork":true,"url":"https://api.github.com/repos/jamessynge/envoy","forks_url":"https://api.github.com/repos/jamessynge/envoy/forks","keys_url":"https://api.github.com/repos/jamessynge/envoy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jamessynge/envoy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jamessynge/envoy/teams","hooks_url":"https://api.github.com/repos/jamessynge/envoy/hooks","issue_events_url":"https://api.github.com/repos/jamessynge/envoy/issues/events{/number}","events_url":"https://api.github.com/repos/jamessynge/envoy/events","assignees_url":"https://api.github.com/repos/jamessynge/envoy/assignees{/user}","branches_url":"https://api.github.com/repos/jamessynge/envoy/branches{/branch}","tags_url":"https://api.github.com/repos/jamessynge/envoy/tags","blobs_url":"https://api.github.com/repos/jamessynge/envoy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jamessynge/envoy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jamessynge/envoy/git/refs{/sha}","trees_url":"https://api.github.com/repos/jamessynge/envoy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jamessynge/envoy/statuses/{sha}","languages_url":"https://api.github.com/repos/jamessynge/envoy/languages","stargazers_url":"https://api.github.com/repos/jamessynge/envoy/stargazers","contributors_url":"https://api.github.com/repos/jamessynge/envoy/contributors","subscribers_url":"https://api.github.com/repos/jamessynge/envoy/subscribers","subscription_url":"https://api.github.com/repos/jamessynge/envoy/subscription","commits_url":"https://api.github.com/repos/jamessynge/envoy/commits{/sha}","git_commits_url":"https://api.github.com/repos/jamessynge/envoy/git/commits{/sha}","comments_url":"https://api.github.com/repos/jamessynge/envoy/comments{/number}","issue_comment_url":"https://api.github.com/repos/jamessynge/envoy/issues/comments{/number}","contents_url":"https://api.github.com/repos/jamessynge/envoy/contents/{+path}","compare_url":"https://api.github.com/repos/jamessynge/envoy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jamessynge/envoy/merges","archive_url":"https://api.github.com/repos/jamessynge/envoy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jamessynge/envoy/downloads","issues_url":"https://api.github.com/repos/jamessynge/envoy/issues{/number}","pulls_url":"https://api.github.com/repos/jamessynge/envoy/pulls{/number}","milestones_url":"https://api.github.com/repos/jamessynge/envoy/milestones{/number}","notifications_url":"https://api.github.com/repos/jamessynge/envoy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jamessynge/envoy/labels{/name}","releases_url":"https://api.github.com/repos/jamessynge/envoy/releases{/id}","deployments_url":"https://api.github.com/repos/jamessynge/envoy/deployments","created_at":"2017-02-08T19:28:51Z","updated_at":"2017-02-08T19:28:54Z","pushed_at":"2017-03-24T16:53:13Z","git_url":"git://github.com/jamessynge/envoy.git","ssh_url":"git@github.com:jamessynge/envoy.git","clone_url":"https://github.com/jamessynge/envoy.git","svn_url":"https://github.com/jamessynge/envoy","homepage":"https://lyft.github.io/envoy","size":7496,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"lyft:master","ref":"master","sha":"ac3dec354876a40cefd0114da366426c36011882","user":{"login":"lyft","id":4269340,"avatar_url":"https://avatars1.githubusercontent.com/u/4269340?v=3","gravatar_id":"","url":"https://api.github.com/users/lyft","html_url":"https://github.com/lyft","followers_url":"https://api.github.com/users/lyft/followers","following_url":"https://api.github.com/users/lyft/following{/other_user}","gists_url":"https://api.github.com/users/lyft/gists{/gist_id}","starred_url":"https://api.github.com/users/lyft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lyft/subscriptions","organizations_url":"https://api.github.com/users/lyft/orgs","repos_url":"https://api.github.com/users/lyft/repos","events_url":"https://api.github.com/users/lyft/events{/privacy}","received_events_url":"https://api.github.com/users/lyft/received_events","type":"Organization","site_admin":false},"repo":{"id":65214191,"name":"envoy","full_name":"lyft/envoy","owner":{"login":"lyft","id":4269340,"avatar_url":"https://avatars1.githubusercontent.com/u/4269340?v=3","gravatar_id":"","url":"https://api.github.com/users/lyft","html_url":"https://github.com/lyft","followers_url":"https://api.github.com/users/lyft/followers","following_url":"https://api.github.com/users/lyft/following{/other_user}","gists_url":"https://api.github.com/users/lyft/gists{/gist_id}","starred_url":"https://api.github.com/users/lyft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lyft/subscriptions","organizations_url":"https://api.github.com/users/lyft/orgs","repos_url":"https://api.github.com/users/lyft/repos","events_url":"https://api.github.com/users/lyft/events{/privacy}","received_events_url":"https://api.github.com/users/lyft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lyft/envoy","description":"C++ front/service proxy","fork":false,"url":"https://api.github.com/repos/lyft/envoy","forks_url":"https://api.github.com/repos/lyft/envoy/forks","keys_url":"https://api.github.com/repos/lyft/envoy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lyft/envoy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lyft/envoy/teams","hooks_url":"https://api.github.com/repos/lyft/envoy/hooks","issue_events_url":"https://api.github.com/repos/lyft/envoy/issues/events{/number}","events_url":"https://api.github.com/repos/lyft/envoy/events","assignees_url":"https://api.github.com/repos/lyft/envoy/assignees{/user}","branches_url":"https://api.github.com/repos/lyft/envoy/branches{/branch}","tags_url":"https://api.github.com/repos/lyft/envoy/tags","blobs_url":"https://api.github.com/repos/lyft/envoy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lyft/envoy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lyft/envoy/git/refs{/sha}","trees_url":"https://api.github.com/repos/lyft/envoy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lyft/envoy/statuses/{sha}","languages_url":"https://api.github.com/repos/lyft/envoy/languages","stargazers_url":"https://api.github.com/repos/lyft/envoy/stargazers","contributors_url":"https://api.github.com/repos/lyft/envoy/contributors","subscribers_url":"https://api.github.com/repos/lyft/envoy/subscribers","subscription_url":"https://api.github.com/repos/lyft/envoy/subscription","commits_url":"https://api.github.com/repos/lyft/envoy/commits{/sha}","git_commits_url":"https://api.github.com/repos/lyft/envoy/git/commits{/sha}","comments_url":"https://api.github.com/repos/lyft/envoy/comments{/number}","issue_comment_url":"https://api.github.com/repos/lyft/envoy/issues/comments{/number}","contents_url":"https://api.github.com/repos/lyft/envoy/contents/{+path}","compare_url":"https://api.github.com/repos/lyft/envoy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lyft/envoy/merges","archive_url":"https://api.github.com/repos/lyft/envoy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lyft/envoy/downloads","issues_url":"https://api.github.com/repos/lyft/envoy/issues{/number}","pulls_url":"https://api.github.com/repos/lyft/envoy/pulls{/number}","milestones_url":"https://api.github.com/repos/lyft/envoy/milestones{/number}","notifications_url":"https://api.github.com/repos/lyft/envoy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lyft/envoy/labels{/name}","releases_url":"https://api.github.com/repos/lyft/envoy/releases{/id}","deployments_url":"https://api.github.com/repos/lyft/envoy/deployments","created_at":"2016-08-08T15:07:24Z","updated_at":"2017-03-24T12:54:00Z","pushed_at":"2017-03-24T16:53:15Z","git_url":"git://github.com/lyft/envoy.git","ssh_url":"git@github.com:lyft/envoy.git","clone_url":"https://github.com/lyft/envoy.git","svn_url":"https://github.com/lyft/envoy","homepage":"https://lyft.github.io/envoy","size":11084,"stargazers_count":974,"watchers_count":974,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":98,"mirror_url":null,"open_issues_count":81,"forks":98,"open_issues":81,"watchers":974,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lyft/envoy/pulls/588"},"html":{"href":"https://github.com/lyft/envoy/pull/588"},"issue":{"href":"https://api.github.com/repos/lyft/envoy/issues/588"},"comments":{"href":"https://api.github.com/repos/lyft/envoy/issues/588/comments"},"review_comments":{"href":"https://api.github.com/repos/lyft/envoy/pulls/588/comments"},"review_comment":{"href":"https://api.github.com/repos/lyft/envoy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lyft/envoy/pulls/588/commits"},"statuses":{"href":"https://api.github.com/repos/lyft/envoy/statuses/02501ec4b2c5f61415d553fa45a62ea866dde2ae"}}}}
{"actor":{"display_login":"htuch"}}