test: improve net-immediate-finish-test#13062
Conversation
|
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 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.
Nit: in general, please capitalize the first word of comments :-)
|
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.PORTRef: #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