{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/17169","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/17169/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/17169/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/17169/events","html_url":"https://github.com/nodejs/node/issues/17169","id":275578019,"number":17169,"title":"[Tracking issue] Converting tests to use Countdown","user":{"login":"jasnell","id":439929,"avatar_url":"https://avatars2.githubusercontent.com/u/439929?v=4","gravatar_id":"","url":"https://api.github.com/users/jasnell","html_url":"https://github.com/jasnell","followers_url":"https://api.github.com/users/jasnell/followers","following_url":"https://api.github.com/users/jasnell/following{/other_user}","gists_url":"https://api.github.com/users/jasnell/gists{/gist_id}","starred_url":"https://api.github.com/users/jasnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasnell/subscriptions","organizations_url":"https://api.github.com/users/jasnell/orgs","repos_url":"https://api.github.com/users/jasnell/repos","events_url":"https://api.github.com/users/jasnell/events{/privacy}","received_events_url":"https://api.github.com/users/jasnell/received_events","type":"User","site_admin":false},"labels":[{"id":202120392,"url":"https://api.github.com/repos/nodejs/node/labels/good%20first%20issue","name":"good first issue","color":"7057ff","default":true},{"id":176240519,"url":"https://api.github.com/repos/nodejs/node/labels/test","name":"test","color":"990099","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-11-21T03:58:25Z","updated_at":"2017-12-06T18:50:03Z","closed_at":null,"author_association":"OWNER","body":"One possible set of tasks that I can suggest for new contributors who are bit more confident in their Node.js skills, would be converting tests to use the new `../common/countdown` utility module.\r\n\r\nFor instance, if you take a look at: https://github.com/nodejs/node/blob/master/test/parallel/test-http2-client-destroy.js, you'll see that there is a remaining counter (https://github.com/nodejs/node/blob/master/test/parallel/test-http2-client-destroy.js#L19). The test then counts down remaining before closing the server. There are quite a large number of tests in our suite that perform similar actions in ways that are rather inconsistent. The ../common/countdown utility was designed to bring some consistency there.\r\n\r\nThe way the Countdown utility works is straightforward:\r\n\r\n```js\r\nconst common = require('../common');\r\nconst Countdown = require('../common/countdown');\r\n\r\n// ...\r\n\r\nconst countdown = new Countdown(n, common.mustCall(() => {\r\n  // do something here\r\n}));\r\n\r\n// Decrement the counter, the callback is called synchronously when\r\n// countdown.dec is called n times.\r\ncountdown.dec();\r\n```\r\n\r\nI know that there are quite a few of the http2 tests that can benefit from this, along with a bunch of other http and https tests.\r\n\r\nThese tasks would be for folks who are a bit more comfortable with their Node.js skills.\r\n\r\nThere are *many* tests in the suite that could be modified to use this new utility. However, rather than modifying them all at once, if a new contributor wishes to take this on, please one change one or two at a time, leaving other tests for other contributors to pick up on. Just reference this tracking issue in the commit/PR so that we can keep track."},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/349737293","html_url":"https://github.com/nodejs/node/issues/17169#issuecomment-349737293","issue_url":"https://api.github.com/repos/nodejs/node/issues/17169","id":349737293,"user":{"login":"shilomangam","id":11750657,"avatar_url":"https://avatars0.githubusercontent.com/u/11750657?v=4","gravatar_id":"","url":"https://api.github.com/users/shilomangam","html_url":"https://github.com/shilomangam","followers_url":"https://api.github.com/users/shilomangam/followers","following_url":"https://api.github.com/users/shilomangam/following{/other_user}","gists_url":"https://api.github.com/users/shilomangam/gists{/gist_id}","starred_url":"https://api.github.com/users/shilomangam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shilomangam/subscriptions","organizations_url":"https://api.github.com/users/shilomangam/orgs","repos_url":"https://api.github.com/users/shilomangam/repos","events_url":"https://api.github.com/users/shilomangam/events{/privacy}","received_events_url":"https://api.github.com/users/shilomangam/received_events","type":"User","site_admin":false},"created_at":"2017-12-06T18:50:03Z","updated_at":"2017-12-06T18:50:03Z","author_association":"NONE","body":"Created PR for test-http-set-cookies.js\r\nhttps://github.com/nodejs/node/pull/17504\r\n\r\nIt's my first PR for NodeJS so be gentle ;)\r\n"}}
{"actor":{"display_login":"shilomangam"}}