{"action":"created","comment":{"url":"https://api.github.com/repos/nodejs/node/pulls/comments/79946946","id":79946946,"diff_hunk":"@@ -78,10 +78,11 @@ This is the body of the test. This test is quite simple, it just tests that an\n HTTP server accepts `non-ASCII` characters in the headers of an incoming\n request. Interesting things to notice:\n \n-- The use of `common.PORT` as the listening port. Always use `common.PORT`\n-  instead of using an arbitrary value, as it allows to run tests in parallel\n-  safely, as they are not trying to reuse the same port another test is already\n-  using.\n+- If the test doesn't depend on a specific port number then always use 0 instead\n+  of an arbitrary value, as it allows to run tests in parallel safely, as the\n+  operating system will assign a random port. If the test requires a specific\n+  port, for example if the test checks that assigning a specific port works as\n+  expected, then it is ok to assign a specific port number.","path":"doc/guides/writing_tests.md","position":24,"original_position":24,"commit_id":"fdd5e35786fb7c07fb9e5bfad23f8d0dc62df8f8","original_commit_id":"fdd5e35786fb7c07fb9e5bfad23f8d0dc62df8f8","user":{"login":"cjihrig","id":2512748,"avatar_url":"https://avatars.githubusercontent.com/u/2512748?v=3","gravatar_id":"","url":"https://api.github.com/users/cjihrig","html_url":"https://github.com/cjihrig","followers_url":"https://api.github.com/users/cjihrig/followers","following_url":"https://api.github.com/users/cjihrig/following{/other_user}","gists_url":"https://api.github.com/users/cjihrig/gists{/gist_id}","starred_url":"https://api.github.com/users/cjihrig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjihrig/subscriptions","organizations_url":"https://api.github.com/users/cjihrig/orgs","repos_url":"https://api.github.com/users/cjihrig/repos","events_url":"https://api.github.com/users/cjihrig/events{/privacy}","received_events_url":"https://api.github.com/users/cjihrig/received_events","type":"User","site_admin":false},"body":"Shouldn't we suggest using `common.PORT` in any cases?","created_at":"2016-09-21T22:28:06Z","updated_at":"2016-09-21T22:28:06Z","html_url":"https://github.com/nodejs/node/pull/8694#discussion_r79946946","pull_request_url":"https://api.github.com/repos/nodejs/node/pulls/8694","_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments/79946946"},"html":{"href":"https://github.com/nodejs/node/pull/8694#discussion_r79946946"},"pull_request":{"href":"https://api.github.com/repos/nodejs/node/pulls/8694"}}},"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/8694","id":86162547,"html_url":"https://github.com/nodejs/node/pull/8694","diff_url":"https://github.com/nodejs/node/pull/8694.diff","patch_url":"https://github.com/nodejs/node/pull/8694.patch","issue_url":"https://api.github.com/repos/nodejs/node/issues/8694","number":8694,"state":"open","locked":false,"title":"doc: Recommend using port 0 instead of common.PORT","user":{"login":"niklasi","id":1456821,"avatar_url":"https://avatars.githubusercontent.com/u/1456821?v=3","gravatar_id":"","url":"https://api.github.com/users/niklasi","html_url":"https://github.com/niklasi","followers_url":"https://api.github.com/users/niklasi/followers","following_url":"https://api.github.com/users/niklasi/following{/other_user}","gists_url":"https://api.github.com/users/niklasi/gists{/gist_id}","starred_url":"https://api.github.com/users/niklasi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niklasi/subscriptions","organizations_url":"https://api.github.com/users/niklasi/orgs","repos_url":"https://api.github.com/users/niklasi/repos","events_url":"https://api.github.com/users/niklasi/events{/privacy}","received_events_url":"https://api.github.com/users/niklasi/received_events","type":"User","site_admin":false},"body":"<!--\r\nThank you for your pull request. Please review below requirements.\r\n\r\nBug fixes and new features should include tests and possibly benchmarks.\r\n\r\nContributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md\r\n-->\r\n\r\n##### Checklist\r\n<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->\r\n\r\n\r\n- [x] documentation is changed or added\r\n- [x] commit message follows commit guidelines\r\n\r\n##### Affected core subsystem(s)\r\n<!-- Provide affected core subsystem(s) (like doc, cluster, crypto, etc). -->\r\ndoc\r\n\r\n##### Description of change\r\n<!-- Provide a description of the change below this comment. -->\r\nIn the [writing_tests](https://github.com/nodejs/node/blob/master/doc/guides/writing_tests.md) guide it is recommended to use common.PORT\r\ninstead of an arbitrary value, but the recommendation is to use\r\nport 0 instead and the docs should reflect that.","created_at":"2016-09-21T13:30:34Z","updated_at":"2016-09-21T22:28:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"944629076eca6020dcb3e94b948e7e5511bff569","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/nodejs/node/pulls/8694/commits","review_comments_url":"https://api.github.com/repos/nodejs/node/pulls/8694/comments","review_comment_url":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nodejs/node/issues/8694/comments","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/fdd5e35786fb7c07fb9e5bfad23f8d0dc62df8f8","head":{"label":"niklasi:test-guide","ref":"test-guide","sha":"fdd5e35786fb7c07fb9e5bfad23f8d0dc62df8f8","user":{"login":"niklasi","id":1456821,"avatar_url":"https://avatars.githubusercontent.com/u/1456821?v=3","gravatar_id":"","url":"https://api.github.com/users/niklasi","html_url":"https://github.com/niklasi","followers_url":"https://api.github.com/users/niklasi/followers","following_url":"https://api.github.com/users/niklasi/following{/other_user}","gists_url":"https://api.github.com/users/niklasi/gists{/gist_id}","starred_url":"https://api.github.com/users/niklasi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niklasi/subscriptions","organizations_url":"https://api.github.com/users/niklasi/orgs","repos_url":"https://api.github.com/users/niklasi/repos","events_url":"https://api.github.com/users/niklasi/events{/privacy}","received_events_url":"https://api.github.com/users/niklasi/received_events","type":"User","site_admin":false},"repo":{"id":62728111,"name":"node","full_name":"niklasi/node","owner":{"login":"niklasi","id":1456821,"avatar_url":"https://avatars.githubusercontent.com/u/1456821?v=3","gravatar_id":"","url":"https://api.github.com/users/niklasi","html_url":"https://github.com/niklasi","followers_url":"https://api.github.com/users/niklasi/followers","following_url":"https://api.github.com/users/niklasi/following{/other_user}","gists_url":"https://api.github.com/users/niklasi/gists{/gist_id}","starred_url":"https://api.github.com/users/niklasi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niklasi/subscriptions","organizations_url":"https://api.github.com/users/niklasi/orgs","repos_url":"https://api.github.com/users/niklasi/repos","events_url":"https://api.github.com/users/niklasi/events{/privacy}","received_events_url":"https://api.github.com/users/niklasi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/niklasi/node","description":"Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:","fork":true,"url":"https://api.github.com/repos/niklasi/node","forks_url":"https://api.github.com/repos/niklasi/node/forks","keys_url":"https://api.github.com/repos/niklasi/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/niklasi/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/niklasi/node/teams","hooks_url":"https://api.github.com/repos/niklasi/node/hooks","issue_events_url":"https://api.github.com/repos/niklasi/node/issues/events{/number}","events_url":"https://api.github.com/repos/niklasi/node/events","assignees_url":"https://api.github.com/repos/niklasi/node/assignees{/user}","branches_url":"https://api.github.com/repos/niklasi/node/branches{/branch}","tags_url":"https://api.github.com/repos/niklasi/node/tags","blobs_url":"https://api.github.com/repos/niklasi/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/niklasi/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/niklasi/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/niklasi/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/niklasi/node/statuses/{sha}","languages_url":"https://api.github.com/repos/niklasi/node/languages","stargazers_url":"https://api.github.com/repos/niklasi/node/stargazers","contributors_url":"https://api.github.com/repos/niklasi/node/contributors","subscribers_url":"https://api.github.com/repos/niklasi/node/subscribers","subscription_url":"https://api.github.com/repos/niklasi/node/subscription","commits_url":"https://api.github.com/repos/niklasi/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/niklasi/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/niklasi/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/niklasi/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/niklasi/node/contents/{+path}","compare_url":"https://api.github.com/repos/niklasi/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/niklasi/node/merges","archive_url":"https://api.github.com/repos/niklasi/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/niklasi/node/downloads","issues_url":"https://api.github.com/repos/niklasi/node/issues{/number}","pulls_url":"https://api.github.com/repos/niklasi/node/pulls{/number}","milestones_url":"https://api.github.com/repos/niklasi/node/milestones{/number}","notifications_url":"https://api.github.com/repos/niklasi/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/niklasi/node/labels{/name}","releases_url":"https://api.github.com/repos/niklasi/node/releases{/id}","deployments_url":"https://api.github.com/repos/niklasi/node/deployments","created_at":"2016-07-06T14:38:09Z","updated_at":"2016-07-06T14:38:39Z","pushed_at":"2016-09-21T22:19:50Z","git_url":"git://github.com/niklasi/node.git","ssh_url":"git@github.com:niklasi/node.git","clone_url":"https://github.com/niklasi/node.git","svn_url":"https://github.com/niklasi/node","homepage":"https://nodejs.org","size":223467,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"nodejs:master","ref":"master","sha":"b1b1978ec5a533607c5c2decaec44f00ff0a80b4","user":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars.githubusercontent.com/u/9950313?v=3","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"repo":{"id":27193779,"name":"node","full_name":"nodejs/node","owner":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars.githubusercontent.com/u/9950313?v=3","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nodejs/node","description":"Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:","fork":false,"url":"https://api.github.com/repos/nodejs/node","forks_url":"https://api.github.com/repos/nodejs/node/forks","keys_url":"https://api.github.com/repos/nodejs/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nodejs/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nodejs/node/teams","hooks_url":"https://api.github.com/repos/nodejs/node/hooks","issue_events_url":"https://api.github.com/repos/nodejs/node/issues/events{/number}","events_url":"https://api.github.com/repos/nodejs/node/events","assignees_url":"https://api.github.com/repos/nodejs/node/assignees{/user}","branches_url":"https://api.github.com/repos/nodejs/node/branches{/branch}","tags_url":"https://api.github.com/repos/nodejs/node/tags","blobs_url":"https://api.github.com/repos/nodejs/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nodejs/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nodejs/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/nodejs/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/{sha}","languages_url":"https://api.github.com/repos/nodejs/node/languages","stargazers_url":"https://api.github.com/repos/nodejs/node/stargazers","contributors_url":"https://api.github.com/repos/nodejs/node/contributors","subscribers_url":"https://api.github.com/repos/nodejs/node/subscribers","subscription_url":"https://api.github.com/repos/nodejs/node/subscription","commits_url":"https://api.github.com/repos/nodejs/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/nodejs/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/nodejs/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/nodejs/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/nodejs/node/contents/{+path}","compare_url":"https://api.github.com/repos/nodejs/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nodejs/node/merges","archive_url":"https://api.github.com/repos/nodejs/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nodejs/node/downloads","issues_url":"https://api.github.com/repos/nodejs/node/issues{/number}","pulls_url":"https://api.github.com/repos/nodejs/node/pulls{/number}","milestones_url":"https://api.github.com/repos/nodejs/node/milestones{/number}","notifications_url":"https://api.github.com/repos/nodejs/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nodejs/node/labels{/name}","releases_url":"https://api.github.com/repos/nodejs/node/releases{/id}","deployments_url":"https://api.github.com/repos/nodejs/node/deployments","created_at":"2014-11-26T19:57:11Z","updated_at":"2016-09-21T22:11:56Z","pushed_at":"2016-09-21T22:19:51Z","git_url":"git://github.com/nodejs/node.git","ssh_url":"git@github.com:nodejs/node.git","clone_url":"https://github.com/nodejs/node.git","svn_url":"https://github.com/nodejs/node","homepage":"https://nodejs.org","size":303899,"stargazers_count":26913,"watchers_count":26913,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4332,"mirror_url":null,"open_issues_count":825,"forks":4332,"open_issues":825,"watchers":26913,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/8694"},"html":{"href":"https://github.com/nodejs/node/pull/8694"},"issue":{"href":"https://api.github.com/repos/nodejs/node/issues/8694"},"comments":{"href":"https://api.github.com/repos/nodejs/node/issues/8694/comments"},"review_comments":{"href":"https://api.github.com/repos/nodejs/node/pulls/8694/comments"},"review_comment":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nodejs/node/pulls/8694/commits"},"statuses":{"href":"https://api.github.com/repos/nodejs/node/statuses/fdd5e35786fb7c07fb9e5bfad23f8d0dc62df8f8"}}}}
{"actor":{"display_login":"cjihrig"}}