test: use countdown in http-agent test#17537
Conversation
ecb661b to
48c0c96
Compare
test/parallel/test-http-agent.js
Outdated
There was a problem hiding this comment.
Limit of countdown can be outCount*inCount instead of 1.
test/parallel/test-http-agent.js
Outdated
There was a problem hiding this comment.
Can replace this whole if block with countdown.dec();
test/parallel/test-http-agent.js
Outdated
There was a problem hiding this comment.
Can remove responseCount variable.
|
Thanks for contribution!!! Please, do use make lint/vcbuild lint before pr. |
|
@sreepurnajasti Thanks for the comments, I am pretty sure that I did run Do you think this would be ok ? ...
const countdown = new Countdown(
outCount * inCount,
common.mustCall(() => server.close())
);
let onRequest = common.mustNotCall(); // Temporary
const p = new Promise((resolve) => {
onRequest = common.mustCall((res) => {
if (countdown.dec() === 0) {
resolve();
}
if (!shouldFail)
res.resume();
}, outCount * inCount);
});
... |
|
That should work. You can also run |
48c0c96 to
a03d533
Compare
|
Thanks @apapirovski, I have already run all tests and linter 😄 after amending the last commit |
|
@fedekau LGTM. Thanks!! |
|
@apapirovski Do you think that this failure is related to my change? To me seems like it is not, or is it? 🤔 |
|
@fedekau Completely unrelated, this PR is all good :) |
PR-URL: #17537 Reviewed-By: Anatoli Papirovski <[email protected]>
|
Thanks @apapirovski and @sreepurnajasti I hope this is the first of many PRs 💪 |
PR-URL: #17537 Reviewed-By: Anatoli Papirovski <[email protected]>
PR-URL: #17537 Reviewed-By: Anatoli Papirovski <[email protected]>
PR-URL: #17537 Reviewed-By: Anatoli Papirovski <[email protected]>
PR-URL: #17537 Reviewed-By: Anatoli Papirovski <[email protected]>
PR-URL: #17537 Reviewed-By: Anatoli Papirovski <[email protected]>
Hi, this is my first PR to node!
I started by tackling one of the tests listed in #17169, in particular the
test/parallel/test-http-agent.jstest. Hopefully everything looks good to you, otherwise let me know what can be improved 😄Checklist
make -j4 testmake lint