-
Notifications
You must be signed in to change notification settings - Fork 30k
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
[Tracking issue] Converting tests to use Countdown #17169
Comments
@jasnell I am willing to contribute to this issue, but first i recommend creating a list with all the places where this refactor is needed so we an keep a tracked list of whats being worked on and what is yet to be refactored. |
@Bamieh ... absolutely... I'll start digging through later on today and building a list out here in this issue :-) |
Would be nice if there is a guide or a link to https://github.com/nodejs/node/tree/master/test/common#countdown-module in https://github.com/nodejs/node/blob/master/doc/guides/writing-tests.md (Aside: we should add a note on the usage of |
Here is a full list of the http test cases to use Countdown:Feel free to update it please!
The ones marked with (not sure) have arrays of data that they use both as a counter and as the data for each counter, so i am not sure if they should be used in combination with a countdown or just kept as is. |
@AyoAlfonso you have to fork the node package on github, then apply your changes on the fork. Finally you submit a pull request against the main node github master branch. good luck! |
Fixes: #17169 PR-URL: #17874 Fixes: #17169 Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs#17326 Refs: nodejs#17169 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
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.For 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.
The way the Countdown utility works is straightforward:
I 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.
These tasks would be for folks who are a bit more comfortable with their Node.js skills.
There 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.
The text was updated successfully, but these errors were encountered: