Evan Lucas
1d40850338
http2: fix [kInspect]() output for Http2Stream
...
This fixes a typo in the util.inspect output of Http2Stream. It
previously had writeableSate instead of writableState.
PR-URL: https://github.com/nodejs/node/pull/14753
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-08-14 17:27:12 +02:00
Oky Antoro
6d9f94f93f
test: cover all HTTP methods that parser supports
...
Cover all request methods that Node's HTTP parser supports in
parallel/test-http-methods.
PR-URL: https://github.com/nodejs/node/pull/14773
Refs: https://github.com/nodejs/node/issues/14544
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-14 13:20:46 +02:00
Vincent Xue
e4854fccfc
test: use regular expressions in throw assertions
...
Test errors thrown in addons-napi/test_constructor more specifically.
PR-URL: https://github.com/nodejs/node/pull/14318
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2017-08-14 13:20:45 +02:00
Anna Henningsen
92c37fe5fd
http2: improve perf of passing headers to C++
...
By passing a single string rather than many small ones and
a single block allocation for passing headers, save expensive
interactions with JS values and memory allocations.
PR-URL: https://github.com/nodejs/node/pull/14723
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-14 13:20:41 +02:00
Michael Albert
66788fc4d0
test: increase http2 coverage
...
Added tests for `getPackedSettings` to check for not passing `settings`
and for `getUnpackedSettings` to check for a few cases when passing
`{ validate: true }`.
PR-URL: https://github.com/nodejs/node/pull/14701
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-08-14 13:20:40 +02:00
Daniel Bevenius
dbb9c370d4
test: add crypto check to http2 tests
...
When building --without-ssl and running the tests some of the http2 test
fail with the following error message:
internal/util.js:82
throw new errors.Error('ERR_NO_CRYPTO');
^
Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto
support
at Object.assertCrypto (internal/util.js:82:11)
at internal/http2/core.js:5:26
at NativeModule.compile (bootstrap_node.js:586:7)
at NativeModule.require (bootstrap_node.js:531:18)
at http2.js:17:5
at NativeModule.compile (bootstrap_node.js:586:7)
at Function.NativeModule.require (bootstrap_node.js:531:18)
at Function.Module._load (module.js:449:25)
at Module.require (module.js:517:17)
at require (internal/module.js:11:18)
This commit adds hasCrypto checks and skips the tests if there is no
crypto support.
PR-URL: https://github.com/nodejs/node/pull/14657
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-14 13:20:37 +02:00
Kelvin Jin
47bf705f75
http2: rename some nghttp2 stream flags
...
This change makes NGHTTP2_STREAM_* enum values consistent. It also
resolves a collision between enum values defined in
nghttp2_error_code and nghttp2_stream_flags.
PR-URL: https://github.com/nodejs/node/pull/14637
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-08-14 13:20:36 +02:00
James M Snell
723d1af5e7
http2: fix flakiness in timeout
...
Backport-PR-URL: https://github.com/nodejs/node/pull/14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net >
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-14 13:20:34 +02:00
James M Snell
6a30448bac
http2: fix linting after rebase
...
Backport-PR-URL: https://github.com/nodejs/node/pull/14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net >
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-14 13:20:31 +02:00
James M Snell
9a4be4adc4
http2: get trailers working with the compat api
...
Backport-PR-URL: https://github.com/nodejs/node/pull/14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net >
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-14 13:20:15 +02:00
James M Snell
3e5b07a8fb
http2: refactor trailers API
...
Rather than using the `'fetchTrailers'` event to collect trailers,
a new `getTrailers` callback option is supported. If not set, the
internals will skip calling out for trailers at all. Expands the
test to make sure trailers work from the client side also.
Backport-PR-URL: https://github.com/nodejs/node/pull/14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net >
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-14 13:20:11 +02:00
James M Snell
26e1f8e01c
http2: address initial pr feedback
...
Backport-PR-URL: https://github.com/nodejs/node/pull/14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net >
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-14 13:20:08 +02:00
Matteo Collina
7824fa0b40
http2: make writeHead behave like HTTP/1.
...
Backport-PR-URL: https://github.com/nodejs/node/pull/14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net >
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-14 13:20:06 +02:00
Matteo Collina
b778838337
http2: doc and fixes to the Compatibility API
...
Backport-PR-URL: https://github.com/nodejs/node/pull/14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net >
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-14 13:20:02 +02:00
James M Snell
8f3bbd9b68
http2: add range support for respondWith{File|FD}
...
* respondWithFD now supports optional statCheck
* respondWithFD and respondWithFile both support offset/length for
range requests
* Fix linting nits following most recent update
Backport-PR-URL: https://github.com/nodejs/node/pull/14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net >
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-14 13:19:59 +02:00
James M Snell
61696f1215
http2: fix socketOnTimeout and a segfault
...
Fixes: https://github.com/nodejs/http2/issues/179
Was fixing issue #179 and encountered a segault that was
happening somewhat randomly on session destruction. Both
should be fixed
Backport-PR-URL: https://github.com/nodejs/node/pull/14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net >
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-14 13:19:55 +02:00
James M Snell
2620769e7f
http2: refinement and test for socketError
...
Fixes: https://github.com/nodejs/http2/issues/184
Refines the `'socketError'` event a bit and adds a test for the
emission of the `'socketError'` event on the server. Client side
is tested separately
Backport-PR-URL: https://github.com/nodejs/node/pull/14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net >
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-14 13:19:51 +02:00
James M Snell
cd0f4c6652
http2: fix abort when client.destroy inside end event
...
Backport-PR-URL: https://github.com/nodejs/node/pull/14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net >
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-14 13:19:48 +02:00
James M Snell
97f622b99e
test: fix flaky test-http2-client-unescaped-path on osx
...
Backport-PR-URL: https://github.com/nodejs/node/pull/14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net >
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-14 13:19:44 +02:00
James M Snell
9d752d5282
test: fix flakiness in test-http2-client-upload
...
Race condition in the closing of the stream causing failure on
some platforms.
Backport-PR-URL: https://github.com/nodejs/node/pull/14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net >
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-14 13:19:41 +02:00
James M Snell
a49146e446
http2: remove redundant return in test
...
Backport-PR-URL: https://github.com/nodejs/node/pull/14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net >
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-14 13:19:32 +02:00
James M Snell
3eb61b00de
http2: add tests and benchmarks
...
Backport-PR-URL: https://github.com/nodejs/node/pull/14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net >
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-14 13:19:29 +02:00
James M Snell
e84c9d7176
tls: add tlsSocket.disableRenegotiation()
...
Allows TLS renegotiation to be disabled per `TLSSocket` instance.
Per HTTP/2, TLS renegotiation is forbidden after the initial
connection prefix is exchanged.
Backport-PR-URL: https://github.com/nodejs/node/pull/14813
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net >
Backport-Reviewed-By: Timothy Gu <timothygu99@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-14 13:19:15 +02:00
Ruben Bridgewater
116841056a
util: improve util.inspect performance
...
* improve util.inspect performance
This is a huge performance improvement in case of sparse arrays
when using util.inspect as the hole will simple be skipped.
* use faster visibleKeys property lookup
* add inspect-array benchmark
PR-URL: https://github.com/nodejs/node/pull/14492
Fixes: https://github.com/nodejs/node/issues/14487
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-08-13 21:43:48 +02:00
Teddy Katz
1c00875747
repl: include folder extensions in autocomplete
...
When autocompleting `require` calls, the repl strips .js file extensions
from results. However, stripping an extension from a directory results
in an error. Update the autocompletion logic to avoid stripping
extensions from directories.
PR-URL: https://github.com/nodejs/node/pull/14727
Fixes: https://github.com/nodejs/node/issues/14726
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
2017-08-13 21:43:35 +02:00
Rich Trott
82c63a55ea
test: add test-benchmark-arrays
...
Add minimal test to confirm that arrays benchmarks run.
PR-URL: https://github.com/nodejs/node/pull/14728
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-08-13 21:43:18 +02:00
Anna Henningsen
917ace283f
n-api: add napi_get_node_version
...
Add `napi_get_node_version`, to help with feature-detecting
Node.js as an environment.
PR-URL: https://github.com/nodejs/node/pull/14696
Reviewed-By: Kyle Farnung <kfarnung@microsoft.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-08-12 22:00:34 +02:00
Gibson Fahnestock
0eab77c86f
test: allow inspector to reopen with same port
...
Test checks that if you open the inspector with '0' (pick a random free
port), close it, then reopen it, you get a different port. However this
isn't necessarily true.
PR-URL: https://github.com/nodejs/node/pull/14320
Fixes: https://github.com/nodejs/node/issues/14316
Refs: https://github.com/nodejs/node/issues/14316#issuecomment-315680755
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-08-12 22:00:30 +02:00
XadillaX
9bbbf12827
test: remove redundant using in cctest
...
PR-URL: https://github.com/nodejs/node/pull/14739
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
2017-08-12 22:00:27 +02:00
Daniel Bevenius
7eb9f6f6e4
test: make totalLen snake case
...
For consistency, use snake case (total_len) for the local totalLen
variable.
PR-URL: https://github.com/nodejs/node/pull/14765
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-08-12 21:59:13 +02:00
Eugene Ostroukhov
029567a460
inspector: support extra contexts
...
This enables inspector support for contexts created using the vm module.
PR-URL: https://github.com/nodejs/node/pull/14465
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org >
2017-08-12 21:59:04 +02:00
Rich Trott
977e22857a
test: make test-tls-connect checks more strict
...
Check the error code on expected errors so that the introduction of
different errors in refactoring is caught.
While at it, re-order modules alphabetically per test-writing guide.
PR-URL: https://github.com/nodejs/node/pull/14695
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-08-12 21:57:52 +02:00
Timothy Gu
c5ee34e39b
encoding: rudimentary TextDecoder support w/o ICU
...
Also split up the tests.
Backport-PR-URL: https://github.com/nodejs/node/pull/14786
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net >
PR-URL: https://github.com/nodejs/node/pull/14489
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-08-12 14:49:56 +02:00
Anna Henningsen
a781bb4508
Revert "test: disable MultipleEnvironmentsPerIsolate"
...
This reverts commit 95ab966a74 .
Ref: https://github.com/nodejs/node/issues/14206
Ref: https://github.com/nodejs/node/pull/14246
PR-URL: https://github.com/nodejs/node/pull/14749
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2017-08-10 22:15:11 +02:00
Anna Henningsen
8ff2a5c338
Revert "test: add DISABLED_ prefix to commented out test"
...
This reverts commit 75bf8a9db9 .
Ref: https://github.com/nodejs/node/issues/14206
Ref: https://github.com/nodejs/node/pull/14317
PR-URL: https://github.com/nodejs/node/pull/14749
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2017-08-10 22:15:10 +02:00
Anna Henningsen
0bc3124c80
test: properly order freeing resources in cctest
...
The `IsolateData` instance is created before the `Environment` instance,
so free in reverse order.
Fixes: https://github.com/nodejs/node/issues/14206
PR-URL: https://github.com/nodejs/node/pull/14749
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2017-08-10 22:15:09 +02:00
Rich Trott
3f1bb0a551
test: split out load-sensitive readline tests
...
Two test cases in `test-readline-interface` are sensitive to resource
constraints (probably due to `\r` and `\n` not arriving within the
appropriate delay to be treated as a single line ending). Move those
tests to `sequential`.
PR-URL: https://github.com/nodejs/node/pull/14681
Fixes: https://github.com/https://github.com/nodejs/node/issues/14674
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-08-10 21:23:26 +02:00
Rich Trott
5d99d7dff2
test: add block scoping to test-readline-interface
...
Use block-scoping in test-readline-interface to avoid side effects and
make tests more modular. (Some contain race conditions and will need to
be moved to the sequential directory if they can't be refactored to
avoid the race condition.)
Backport-PR-URL: https://github.com/nodejs/node/pull/14748
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net >
PR-URL: https://github.com/nodejs/node/pull/14615
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-10 21:13:47 +02:00
Prakash Palaniappan
58742729da
test: set module loading error for aix
...
In test/parallel/test-module-loading-error.js, an attempt is made to
load a text file as a native executable. This results in an error
message in a platform specific manner.
AIX was not included in the list of platforms. This fix introduces
the AIX error messages.
PR-URL: https://github.com/nodejs/node/pull/14511
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-08-10 18:22:29 +02:00
Nick Stanish
06ba2dae30
test: fix conversion of microseconds in test
...
PR-URL: https://github.com/nodejs/node/pull/14706
Fixes: https://github.com/nodejs/node/issues/8728
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
2017-08-10 18:21:01 +02:00
Rich Trott
30837b3b90
test: improve check in test-os
...
The check for `os.networkInterfaces()` in `test-os.js` may be too
strict. It's apparently possible for a machine to be configured with
multiple IPv4 loopback interfaces. Increase specificity of filter to
check on only the object we expect.
PR-URL: https://github.com/nodejs/node/pull/14655
Fixes: https://github.com/nodejs/node/issues/14654
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-10 18:20:55 +02:00
Miguel Angel Asencio Hurtado
55aba6aee7
test: replace indexOf with includes
...
Refs: https://github.com/nodejs/node/issues/12586
PR-URL: https://github.com/nodejs/node/pull/14630
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
2017-08-10 18:20:49 +02:00
Azard
935d34bd6b
test: fix test-readline-interface
...
Previous unit test delay is too short for parallel test on raspberry pi,
it will fail sometimes. This PR use common.platformTimeout and widen
the time gap.
PR-URL: https://github.com/nodejs/node/pull/14677
Ref: https://github.com/nodejs/node/issues/14674
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2017-08-10 18:20:39 +02:00
Guy Margalit
ef8ac7b5ac
stream: support readable/writableHWM for Duplex
...
This commits adds support for readableHighWaterMark and
writableHighWaterMark in Duplex stream, so that they can be set without
accessing the internal state.
Fixes: https://github.com/nodejs/node/issues/14555
PR-URL: https://github.com/nodejs/node/pull/14636
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-10 18:20:33 +02:00
James M Snell
2ee3320f2c
test: improve multiple timers tests
...
PR-URL: https://github.com/nodejs/node/pull/14616
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-08-10 18:20:22 +02:00
Jason Ginchereau
5e2cce59ef
n-api: optimize number API performance
...
- Add separate APIs for creating different kinds of numbers,
because creating a V8 number value from an integer is faster
than creating one from a double.
- When getting number values, avoid getting the current context
because the context will not actually be used and is expensive
to obtain.
- When creating values, don't use v8::TryCatch (NAPI_PREAMBLE),
because these functions have no possibility of executing JS code.
Refs: https://github.com/nodejs/node/issues/14379
PR-URL: https://github.com/nodejs/node/pull/14573
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-08-10 18:20:18 +02:00
Jérémy Lal
71f2e76353
test: use ciphers supported by shared OpenSSL
...
On Debian with OpenSSL 1.1 CLI, the ciphers used in those tests were
unknown.
PR-URL: https://github.com/nodejs/node/pull/14566
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-10 18:20:14 +02:00
Aditya Anand
f73f659186
test: mitigate RegEx exceeding 80 chars
...
Format commit wrapping lines containing RegEx and exceeding 80
chars.
PR-URL: https://github.com/nodejs/node/pull/14607
Fixes: https://github.com/nodejs/node/issues/14586
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2017-08-10 18:20:09 +02:00
Jan Krems
d89f9f82b0
inspector: allow require in Runtime.evaluate
...
Some parts were written by Timothy Gu <timothygu99@gmail.com >.
PR-URL: https://github.com/nodejs/node/pull/8837
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Aleksei Koziatinskii <ak239spb@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
2017-08-10 18:19:45 +02:00
Bartosz Sosnowski
96147c980c
test: read proper inspector message size
...
Fix a bug when messages bigger than 64kb where incorrectly parsed by
the inspector-helper.
PR-URL: https://github.com/nodejs/node/pull/14596
Fixes: https://github.com/nodejs/node/issues/14507
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-10 18:18:46 +02:00