-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
test: improve net-immediate-finish-test #13062
Conversation
Continuation of #12996 |
continued.... Thanks for letting me know, I am still working on timing on these PRs, I've only been at it for a week. |
I don't really see the value in the code changes. Moving the test is fine however. |
Just literal coding, trying to convey the rational. |
Why the move to It never actually tries to make a connection to the port or use it in any way. The hostname lookup fails first and that throws an error, by design. I'm not sure what is meant by "sanitary" here unless the idea is that should // The port is not used but should be a valid value to avoid port-based errors.
// We want the invalid hostname to trigger an error instead.
const thisPortIsNotActuallyUsed = 6767; |
@Trott it's a case of "safe than sorry"... Since the test tries to make a connection to a non existing server it reminded me of #12964. I agree that it very very highly unlikely that If nobody likes this I'll reduce the change to your snippet. P.S. the placing of the |
this tests need to fail, it's more "sanitary" to run it in /sequential/ Ref: nodejs#12376
const assert = require('assert'); | ||
const net = require('net'); | ||
|
||
const client = net.connect({host: '***', port: common.PORT}); | ||
// since this test should fail with `ENOTFOUND` becuase of the unfindable host |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: in general, please capitalize the first word of comments :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
There was no update here for a long time and to me it seems this has no high likelihood of getting merged. Closing it therefore. @refack please reopen if you would like to have another look at this. |
this tests need to fail, it's more "sanitary" to run it in /sequential/
added comment why it's ok to use
common.PORT
Ref: #12996
Ref: #12376
Ref: #12950
Ref: #12951
Ref: #13055
Ref: #12964
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test,net