summaryrefslogtreecommitdiff
path: root/test/parallel/test-net-connect-immediate-finish.js
AgeCommit message (Collapse)Author
2019-03-25net: do not manipulate potential user codeRuben Bridgewater
The error provided in this function could come from user code. Thus the error should not be manipulated in any way. The added properties do not seem to provide any actual value either as can not be part of the error. The `hostname` is already set on the error and adding the `host` property with the identical value does not seem right in this case. PR-URL: https://github.com/nodejs/node/pull/26751 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-12-17doc,lib,test: capitalize comment sentencesRuben Bridgewater
This activates the eslint capitalize comment rule for comments above 50 characters. PR-URL: https://github.com/nodejs/node/pull/24996 Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-05test: remove common.PORT from parallel testsRich Trott
`common.PORT` should not be used in parallel tests because another test may experience a collision with `common.PORT` when using port 0 to get an open port. This has been observed to result in test failures in CI. PR-URL: https://github.com/nodejs/node/pull/17410 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Lance Ball <lball@redhat.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-11-28test: mock the lookup function in parallel testsJoyee Cheung
These tests should not make any DNS calls. The lookup would fail when the DNS requests are hijacked and time out instead of erroring out. PR-URL: https://github.com/nodejs/node/pull/17296 Refs: https://github.com/nodejs/help/issues/687 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-25test: allow for different nsswitch.conf settingsDaniel Bevenius
The motivation for this commit is that these two test fail on systems that have different Name Service Switch configuration settings. A concrete example of this is when using Red Hat Enterprise Linux (RHEL) 7. If Name Service Switch is available on the operating system then it might be configured differently (/etc/nsswitch.conf). If the system is configured with no dns the error code will be AI_AGAIN, but if there are more services after the dns entry, for example some linux distributions skip a myhostname service by default which would still produce the ENOTFOUND error. This commit suggests checking for either ENOTFOUND or EAI_AGAIN to accommodate systems like the ones described above. The references below indicate that others have run, or are running, into this aswell. Refs: https://github.com/nodejs/node/issues/12075 Refs: https://github.com/nodejs/help/issues/687 Refs: https://github.com/nodejs/node/issues/15825 PR-URL: https://github.com/nodejs/node/pull/16378 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-08-16test: use reserved invalid hostname for testsicarter09
PR-URL: https://github.com/nodejs/node/pull/14781 Refs: https://tools.ietf.org/html/rfc2606#section-2 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-07-21lib,src: fix consistent spacing inside bracesSebastiaan Deckers
PR-URL: https://github.com/nodejs/node/pull/14162 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-05-09test: use dynamic port instead of common.PORTAditya Anand
Remove common.PORT from, test-net-connect-immediate-destroy, test-net-options-lookup, test-net-connect-local-error, test-net-connect-handle-econnrefused, test-net-socket-destroy-twice, test-net-better-error-messages-port-hostname, test-net-localerror, to reduce possibility that a dynamic port used in another test will collide with common.PORT. Moved test-net-listen-shared-ports, test-net-better-error-messages-port from tests/parallel to test/sequential Refs: https://github.com/nodejs/node/issues/12376 PR-URL: https://github.com/nodejs/node/pull/12473 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2017-03-10meta: restore original copyright headerJames M Snell
A prior io.js era commit inappropriately removed the original copyright statements from the source. This restores those in any files still remaining from that edit. Ref: https://github.com/nodejs/TSC/issues/174 Ref: https://github.com/nodejs/node/pull/10599 PR-URL: https://github.com/nodejs/node/pull/10155 Note: This PR was required, reviewed-by and approved by the Node.js Foundation Legal Committee and the TSC. There is no `Approved-By:` meta data.
2016-06-15test: fix test-net-* error code check for getaddrinfo(3)Natanael Copa
Replace '...' as invalid hostname with '***', which will give a more consisten error message on different systems. The hostname '...' returns EAI_AGAIN on musl libc and EAI_NONAME on most other systems. By changing the testcase we get same restult on all known platforms. PR-URL: https://github.com/nodejs/node/pull/5099 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
2015-11-09test: use really invalid hostnameSakthipriyan Vairamani
On my slow Ubuntu 14.04 machine, this fails to resolve the host name used (`no.way.you.will.resolve.this`) and it times out in local testing. This patch uses an invalid name (`...`) and does stricter validation of the error returned. PR-URL: https://github.com/nodejs/node/pull/3711 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2015-05-19test: enable linting for testsRoman Reiss
Enable linting for the test directory. A number of changes was made so all tests conform the current rules used by lib and src directories. The only exception for tests is that unreachable (dead) code is allowed. test-fs-non-number-arguments-throw had to be excluded from the changes because of a weird issue on Windows CI. PR-URL: https://github.com/nodejs/io.js/pull/1721 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-12Remove excessive copyright/license boilerplateisaacs
The copyright and license notice is already in the LICENSE file. There is no justifiable reason to also require that it be included in every file, since the individual files are not individually distributed except as part of the entire package.
2014-12-17test: split test in parallel/sequentialFedor Indutny
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> PR-URL: https://github.com/iojs/io.js/pull/172 Fix: iojs/io.js#139