Commit Graph

186 Commits (a73fcda57083d3438cbe7a5bb4606e4c99eba5b5)

Author SHA1 Message Date
Rich Trott 5b3587dbc6 test: remove obsolete TLS test
The test involving melissadata.net was to make sure Node.js still
tolerated ValiCert 1024-bit certs. It has been several years since
melissadata.net used ValiCert as a root certificate and for that matter,
we removed ValiCert in a4dbf45b59 so it
would have broken then if it was still using it. The test is no longer
valid or needed and hasn't been for several years.

PR-URL: https://github.com/nodejs/node/pull/39001
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2021-06-13 06:11:41 -07:00
Rich Trott c704faa0f9 test: fix flaky test-dns and test-dns-lookup
Ubuntu 16.04 is going to be unsupported after April 2021. Switching
Node.js CI to Ubuntu 18.04 for the internet tests resulted in failures
in test-dns and test-dns-lookup because it returns server failure/try
again on .invalid domain. Add a hostname for testing that will return
record not found.

PR-URL: https://github.com/nodejs/node/pull/38282
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2021-04-18 12:19:33 -07:00
James M Snell 5e588c1c7c
test: fixup failing test/internet/test-dns.js
The `ttl` for the `nodejs.org` DNS record is returning `0`
currently. The test checks for `> 0`, causing the test to
fail.

Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/38241
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-04-16 18:45:28 -07:00
Rich Trott 330f25ef82 test: prepare for consistent comma-dangle lint rule
Make changes so that tests will pass when the comma-dangle settings
applied to the rest of the code base are also applied to tests.

PR-URL: https://github.com/nodejs/node/pull/37930
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
2021-04-01 23:14:29 -07:00
Rich Trott 088dfce777 test: fix error in test/internet/test-dns.js
Refs: https://github.com/nodejs/node/pull/35466#issuecomment-721936009

PR-URL: https://github.com/nodejs/node/pull/35969
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2020-11-05 05:50:20 -08:00
Tobias Nießen 30fb4a015d test: add common.mustSucceed
PR-URL: https://github.com/nodejs/node/pull/35086
Reviewed-By: Ruy Adorno <ruyadorno@github.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-10-17 00:48:26 +02:00
Danny Sonnenschein 6f34498148 net: add support for resolving DNS CAA records
This adds support for DNS Certification Authority Authorization
(RFC 8659) to Node.js.

PR-URL: https://github.com/nodejs/node/pull/35466
Fixes: https://github.com/nodejs/node/issues/19239
Refs: https://github.com/nodejs/node/issues/14713
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-10-16 10:21:32 +02:00
Rich Trott f593f9e9ef test: adjust comments for upcoming lint rule
Enforce `//` for multiline comments. Some tests mixed and matched, and
at least one did so in a (to me) surprising way.

PR-URL: https://github.com/nodejs/node/pull/35485
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-10-07 04:36:02 -07:00
Denys Otrishko c66e6471e7
lib: remove ERR_INVALID_OPT_VALUE and ERR_INVALID_OPT_VALUE_ENCODING
This will be a start to generalize all argument validation
errors. As currently we throw ARG/OPT, OUT_OF_RANGE, and other more
specific errors.
The OPT errors didn't bring much to the errors as it's just another
variant of ARG error which is sometimes more confusing (some of our code
used OPT errors to denote just argument validation errors presumably
because of similarity of OPT to 'option' and not 'options-object')
and they don't specify the name of the options object where the invalid
value is located. Much better approach would be to just specify path
to the invalid value in the name of the value as it is done in this PR
(i.e. 'options.format', 'options.publicKey.type' etc)

Also since this decreases a variety of errors we have it'd be easier to
reuse validation code across the codebase.

Refs: https://github.com/nodejs/node/pull/31251
Refs: https://github.com/nodejs/node/pull/34070#discussion_r467251009
Signed-off-by: Denys Otrishko <shishugi@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/34682
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-09-11 17:54:42 +03:00
Rich Trott 4fa439c5fe test: make test-tls-reuse-host-from-socket pass without internet
Start up a TLS server on localhost rather than using example.org.

PR-URL: https://github.com/nodejs/node/pull/34953
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-08-29 22:40:57 -07:00
Anna Henningsen 2c4ebe0426
test: use `.then(common.mustCall())` for all async IIFEs
This makes sure that all async functions finish as expected.

PR-URL: https://github.com/nodejs/node/pull/34363
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-07-20 18:13:28 +02:00
AshCripps e14786f69f test: mark test-dgram-multicast-ssmv6-multi-process flaky
refs: https://github.com/nodejs/node/issues/32946

Mark this test as flaky on linux
Ive used sequential.status as a template for this file

PR-URL: https://github.com/nodejs/node/pull/33498
Refs: https://github.com/nodejs/node/issues/32946
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-05-22 14:37:37 -07:00
Rich Trott 23a61eb683 test: fix test-dns-idna2008
The DNS server will sometimes return an IPv6 address (as seen in nightly
CI from time to time). Use `family` option to force IPv4.

PR-URL: https://github.com/nodejs/node/pull/33367
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-05-15 05:48:48 -07:00
bcoe 6a07eca49c
http2: wait for secureConnect before initializing
PR-URL: https://github.com/nodejs/node/pull/32958
Fixes: https://github.com/nodejs/node/issues/32922
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-04-22 18:22:46 -07:00
Rich Trott fb74e98243 test: fix flaky test-dns-any.js
Remove google.com from domains tested with ANY queries.

Fixes: https://github.com/nodejs/node/issues/31721

PR-URL: https://github.com/nodejs/node/pull/32017
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-03-02 07:02:51 -08:00
Rich Trott 84836df150 test: improve assertion message in test-dns-any
Improve error message from "The expression evaluated to a falsy value"
to a message formatted dynamically that lists the record types found so
that someone investigating can look at the code and determine which
values are missing.

This came up because the test failed in nightly master branch CI but
generally passes. It may prove helpful to know what record types were
missing. (All of them? Just one? Something else?)

PR-URL: https://github.com/nodejs/node/pull/31697
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-02-10 07:42:44 -10:00
Ruben Bridgewater e038d6a1cd
test: refactor common.expectsError
This completely refactors the `expectsError` behavior: so far it's
almost identical to `assert.throws(fn, object)` in case it was used
with a function as first argument. It had a magical property check
that allowed to verify a functions `type` in case `type` was passed
used in the validation object. This pattern is now completely removed
and `assert.throws()` should be used instead.

The main intent for `common.expectsError()` is to verify error cases
for callback based APIs. This is now more flexible by accepting all
validation possibilites that `assert.throws()` accepts as well. No
magical properties exist anymore. This reduces surprising behavior
for developers who are not used to the Node.js core code base.

This has the side effect that `common` is used significantly less
frequent.

PR-URL: https://github.com/nodejs/node/pull/31092
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-12-31 15:54:20 +01:00
Ruben Bridgewater ac2fc0dd5f
errors: improve ERR_INVALID_ARG_TYPE
ERR_INVALID_ARG_TYPE is the most common error used throughout the
code base. This improves the error message by providing more details
to the user and by indicating more precisely which values are allowed
ones and which ones are not.

It adds the actual input to the error message in case it's a primitive.
If it's a class instance, it'll print the class name instead of
"object" and "falsy" or similar entries are not named "type" anymore.

PR-URL: https://github.com/nodejs/node/pull/29675
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-12-20 03:10:13 +01:00
Taylor Gagne a18ec07406 test: refactor test-dgram-multicast-set-interface-lo.js
Convert functions to arrow functions. Remove unused param('signal') from
function.

PR-URL: https://github.com/nodejs/node/pull/30536
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-11-21 21:52:56 -08:00
Rich Trott 03b5c46bc4 test: move test not requiring internet from internet to parallel
test-dgram-send-cb-quelches-error works with or without a network. Move
to `parallel` directory.

PR-URL: https://github.com/nodejs/node/pull/30545
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-11-21 10:26:29 -08:00
Rich Trott afa4f579d3 test: use reserved .invalid TLD for invalid address in test
RFC 2606 reserves ithe .invalid top-level-domain for use in "domain
names that are sure to be invalid and which it is obvious at a glance
are invalid." Replace `dne.example.com` which actually isn't guaranteed
to not exist. (example.com is for examples, but at least one address
does in fact exist in that TLD.)

PR-URL: https://github.com/nodejs/node/pull/30545
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-11-21 10:26:27 -08:00
Rich Trott f04f4aef10 test: improve assertion message in internet dgram test
When an error occurs unexpectedly, let the user know what the error is.

PR-URL: https://github.com/nodejs/node/pull/30545
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-11-21 10:26:26 -08:00
Richard Lau 3b124e0a73
tools: make doctool work if no internet available
Allow doctool to fallback to use local files if not building a release
build.

PR-URL: https://github.com/nodejs/node/pull/30214
Fixes: https://github.com/nodejs/node/issues/29918
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2019-11-05 22:10:33 -05:00
Lucas Pardue 1784b7fafa
dgram: add source-specific multicast support
This adds RFC 4607 support for IPv4 and IPv6.

Co-Authored-By: Nicolas Thumann <46975855+n-thumann@users.noreply.github.com>
Co-Authored-By: Rich Trott <rtrott@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/15735
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-10-17 03:12:53 +02:00
Joyee Cheung 1432065e9d
lib: correct error.errno to always be numeric
Historically `error.errno` of system errors thrown by Node.js
can sometimes be the same as `err.code`, which are string
representations of the error numbers. This is useless and incorrect,
and results in an information loss for users since then they
will have to resort to something like
`process.binding('uv'[`UV_${errno}`])` to get to the numeric
error codes.

This patch corrects this behavior by always setting `error.errno`
to be negative numbers. For fabricated errors like `ENOTFOUND`,
`error.errno` is now undefined since there is no numeric equivalent
for them anyway. For c-ares errors, `error.errno` is now undefined
because the numeric representations (negated) can be in conflict
with libuv error codes - this is fine since numeric codes was
not available for c-ares errors anyway.

Users can use the public API `util.getSystemErrorName(errno)`
to retrieve string codes for these numbers.

PR-URL: https://github.com/nodejs/node/pull/28140
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-17 10:18:09 +08:00
Richard Lau 4ec6135c71 doc,tools: get altDocs versions from CHANGELOG.md
Parse `CHANGELOG.md` for versions of Node.js used by the documentation
feature `View another version` so that we don't have to manually update
the list when we cut a new version or transition a release to LTS.

PR-URL: https://github.com/nodejs/node/pull/27661
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-01 10:17:30 +02:00
Benjamin Ki 7294897c77 test: use common.PORT instead of an extraneous variable
This test is not parallelized and so we can use the test commons PORT
variable.

Refs: https://github.com/nodejs/node/pull/27565#discussion_r281000162

PR-URL: https://github.com/nodejs/node/pull/27565
Fixes: https://github.com/nodejs/node/issues/27341
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-05-13 14:26:40 -07:00
Benjamin Ki 402a793012 test: move dgram invalid host test to internet tests
This moves a dgram test from `parallel` to `internet` because it relies
on a DNS request.
In certain cases, ISPs hijack invalid IETF-reserved invalid names which
causes a false negative failure.

Fixes: https://github.com/nodejs/node/issues/27341

PR-URL: https://github.com/nodejs/node/pull/27565
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-05-13 14:26:38 -07:00
Rich Trott f6bd3b27ee test: fix test-dns-idna2008.js
The test should pass if ESERVFAIL is the result.

Refs: https://github.com/nodejs/node/issues/25870#issuecomment-471024667

PR-URL: https://github.com/nodejs/node/pull/27208
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-04-14 22:40:06 -07:00
Rich Trott 8330555295 test: refactor test-dgram-broadcast-multi-process
* Add check that `signal` is not null in callback.
* Use arrow functions for callbacks, destructuring where appropriate,
  and a trailing comma in multi-line arrays

PR-URL: https://github.com/nodejs/node/pull/26846
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-03-23 19:58:04 -07:00
Refael Ackermann f77555f792 test: fix syntax error in test-dns-idna2008.js when failing
Fixes a bug I introduced in 961322178d

PR-URL: https://github.com/nodejs/node/pull/26570
Refs: https://github.com/nodejs/node/issues/25870
Refs: https://github.com/nodejs/node/pull/26473
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-03-12 11:11:38 -04:00
Ruben Bridgewater f8763bb077
benchmark,doc,lib,test: capitalize comments
PR-URL: https://github.com/nodejs/node/pull/26483
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2019-03-10 00:44:40 +01:00
Refael Ackermann 961322178d test: de-flake test-dns-idna2008.js
* use known well-behaved DNS server
* force pass on ESERVFAIL

PR-URL: https://github.com/nodejs/node/pull/26473
Fixes: https://github.com/nodejs/node/issues/25870
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-03-09 10:13:02 -05:00
Ruben Bridgewater 9edce1e12a
benchmark,doc,lib,test: capitalize comments
This updates a lot of comments.

PR-URL: https://github.com/nodejs/node/pull/26223
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2019-02-28 18:31:10 +01:00
Ben Noordhuis f399b01dc4
dns: use IDNA 2008 to encode non-ascii hostnames
Before this commit, Node.js left it up to the system resolver or c-ares.

Leaving it to the system resolver introduces platform differences
because:

* some support IDNA 2008
* some only IDNA 2003 (glibc until 2.28), and
* some don't support IDNA at all (musl libc)

c-ares doesn't support IDNA either although curl does, by virtue of
linking against libidn2. Upgrading from libidn1 to libidn2 in order
to get proper IDNA 2008 support was the fix for curl's CVE-2016-8625.

libidn2 is not an option (incompatible license) but ICU has an IDNA API
and we already use that in one place. For non-ICU builds, we fall back
to the bundled punycode.js that also supports IDNA 2008.

Fixes: https://github.com/nodejs-private/security/issues/97
Fixes: https://github.com/nodejs/node/issues/25558

PR-URL: https://github.com/nodejs/node/pull/25679
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2019-01-28 20:42:44 +01:00
Rich Trott 9987f1abb9 test: tune test-uv-threadpool-schedule
test-uv-threadpool-schedule has been failing consistently in
node-daily-master CI. It also fails consistently on my personal laptop.
These changes make it pass consistently with current master but fail
consistently with Node.js 10.11 (which was the last release in the 10.x
line before the fix that the test is for). It succeeds/fails as expected
whether or not I am connected to the network.

Fixes: https://github.com/nodejs/node/issues/25305

PR-URL: https://github.com/nodejs/node/pull/25358
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2019-01-07 19:08:05 -08:00
Gireesh Punathil 54fa59c8bf test: regression test for uv threadpool congestion
Validate that massive dns lookups do not block filesytem I/O
(or any fast I/O for that matter).
Prior to https://github.com/libuv/libuv/pull/1845 few back-to-back dns
lookup were sufficient to engage libuv threadpool workers in a blocking
manner, throttling other work items that need the pool. this test acts
as a regression test for the same.

Start slow and fast I/Os together, and make sure fast I/O can complete
in at least in 1/100th of time for slow I/O.

Refs: https://github.com/libuv/libuv/pull/1845
Refs: https://github.com/nodejs/node/issues/8436

PR-URL: https://github.com/nodejs/node/pull/23099
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-12-30 19:45:57 +05:30
Ilarion Halushka a0bdeb5530 test: improve internet/test-dns
* change 'for' loop to 'for of' loop
* remove unused parameters passed to functions
* remove unnecessary 'assert.ok'

PR-URL: https://github.com/nodejs/node/pull/24927
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-12-12 07:15:07 -08:00
Lakshmi Shanmugam 051e083ca4 test: fixed the arguments order in `assert.strictEqual`
PR-URL: https://github.com/nodejs/node/pull/24414
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-11-17 19:18:41 -08:00
cjihrig a74b4a062f
test: remove unused catch bindings
PR-URL: https://github.com/nodejs/node/pull/24079
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
2018-11-06 10:59:18 -05:00
Brandon Smith 13340d47fc benchmark,doc,lib,src,test,tools: fix typos
PR-URL: https://github.com/nodejs/node/pull/23302
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-10-09 16:53:12 +03:00
Masashi Hirano a58f37720d test: add dns.onlookupall() to increase coverage
Added test that callback should be called when error occurs
in dns.lookupall().

PR-URL: https://github.com/nodejs/node/pull/22985
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-27 05:40:12 +02:00
Ruben Bridgewater 9ccf5c8954
test: don't inspect values if not necessary
The inspection triggered on each assert call eagerly even tough the
assertion was never triggered. That caused significant CPU overhead.

PR-URL: https://github.com/nodejs/node/pull/22903
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-09-18 13:12:34 +02:00
Rich Trott 120814b15c test: fix test-trace-events-dns
Test is using `common.fileExists()` which has been removed. There is no
need to check that the file exists as the attempt to read the file in
the next line will fail if the file does not exist. Remove existence
check.

PR-URL: https://github.com/nodejs/node/pull/22674
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-09-03 11:56:22 -04:00
Chin Huang b366de582b
src: add trace points to dns
Add trace points to dns under node.dns.native category.
Emit trace events for dns operations. Use the
nestable async events instead of deprecated ones.
Include test code to verify the trace log. The
trace name is stored as const char* class variable.
The test code is to check each operation in separate
sync processes.

Refs: https://github.com/nodejs/node/pull/19157

PR-URL: https://github.com/nodejs/node/pull/21840
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-09-02 21:35:35 +02:00
Joyee Cheung a58b8dd545
test: move test that depends on dns query to internet
These test cases in `test/parallel/test-dns-lookup.js` send
dns requests and depend on the results, which could fail
if the DNS service for invalid hosts is hijacked by the ISP.

PR-URL: https://github.com/nodejs/node/pull/22516
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-08-31 19:10:17 +02:00
cjihrig 8b0c482647
dns: make process.binding('cares_wrap') internal
PR-URL: https://github.com/nodejs/node/pull/22474
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-08-30 09:08:44 -04:00
Vse Mozhet Byt 682f9b4709 test: rename some allegories
PR-URL: https://github.com/nodejs/node/pull/22307
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-08-14 17:54:40 +03:00
conectado 586a7a4b13 test: remove setTimeout in test-net-connect-unref
Removes the setTimeout since if the test were to fail it would time out
due to the tools/test.py wrapper

PR-URL: https://github.com/nodejs/node/pull/21969
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-07-26 16:43:21 -07:00
Helio Frota 2058a1c35a
test: allow tests to pass without internet
PR-URL: https://github.com/nodejs/node/pull/21909
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Lance Ball <lball@redhat.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-07-21 09:22:44 -04:00