Ruben Bridgewater
4f49ae52f8
test: check util.inspect circular Set and Map refs
...
Ref: https://github.com/nodejs/node/pull/14775
PR-URL: https://github.com/nodejs/node/pull/14790
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.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 >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-09-12 03:17:00 +02:00
Pini Houri
9589641c5c
http2: Expose Http2ServerRequest/Response
...
In order for express (and possibly other libraries) to get and use
the Http2ServerRequest/Response - expose them in the http2 exports.
Same as is done in http module.
PR-URL: https://github.com/nodejs/node/pull/14690
Ref: https://github.com/expressjs/express/issues/3390
Fixes: https://github.com/nodejs/node/issues/14672
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-09-12 03:16:55 +02:00
Beth Griggs
27ec693a53
test: add missing console.error to exec-maxBuffer
...
Adds the missing console.error to test-child-process-exec-maxBuffer
PR-URL: https://github.com/nodejs/node/pull/14796
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: David Cai <davidcai1993@yahoo.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-09-10 02:34:00 +02:00
Jimmy Thomson
4d2aa16d33
process: keep process prototype in inheritance chain
...
The global `process` object had its prototype replaced with a
fresh object that had `EventEmitter.prototype` as its prototype.
With this change, the original `process.constructor.prototype` is
modified to have `EventEmitter.prototype` as its prototype, reflecting
that `process` objects are also `EventEmitter`s.
Fixes: https://github.com/nodejs/node/issues/14699
PR-URL: https://github.com/nodejs/node/pull/14715
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-09-10 02:34:00 +02:00
Rich Trott
7f02c36c4f
test: fix test-cluster-send-handle-large-payload
...
On macOS, the parent process might not receive a message if it
is sent to soon, and then subsequent messages are also sometimes not
received.
(Is this a bug or expected operating system behavior like the
way a file watcher is returned before it's actually watching the file
system on/ macOS?)
Send a second message after a delay on macOS.
While at it, minor refactoring to the test:
* Blank line after loading `common` module per test-writing guide
* Wrap arrow function in braces where implicit return is not needed
* Remove unnecessary unref in subprocess
PR-URL: https://github.com/nodejs/node/pull/14780
Fixes: https://github.com/nodejs/node/issues/14747
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-09-10 02:33:59 +02:00
Mudit Ameta
136eea4bcb
os: add CIDR support
...
This patch adds support for CIDR notation to the output of the
`networkInterfaces()` method
PR-URL: https://github.com/nodejs/node/pull/14307
Fixes: https://github.com/nodejs/node/issues/14006
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
2017-09-10 01:42:18 +02:00
Griffith Tchenpan
4205648216
test: invoke callback with common.mustCall()
...
* invoke callback with `common.mustCall()` in test-crypto-hash
* order module declarations aphabetically per test-writing-guide
PR-URL: https://github.com/nodejs/node/pull/8597
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2017-09-10 01:42:11 +02:00
Rich Trott
a3feb54c7f
test: make test-tls-alert-handling more strict
...
Use `common.mustCall()` and `common.mustNotCall()` to more rigorously
check that functions (especially no-op error handlers) are called the
expected number of times in test-tls-alert-handling.
PR-URL: https://github.com/nodejs/node/pull/14650
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: David Cai <davidcai1993@yahoo.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-09-10 01:42:07 +02:00
Daniel Bevenius
d4f2a52953
test: check crypto before requiring tls module
...
test-tls-session-cache currently fails if built --without-ssl:
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 tls.js:26:14
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)
at Object.<anonymous>
(/node/test/parallel/test-tls-session-cache.js:26:13)
at Module._compile (module.js:573:30)
at Object.Module._extensions..js (module.js:584:10)
The test has a crypto check but it come after the require of the tls
module.
This commit moves the crypto check to come before the require of tls and
allows the test to pass.
PR-URL: https://github.com/nodejs/node/pull/14708
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: David Cai <davidcai1993@yahoo.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.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: James M Snell <jasnell@gmail.com >
2017-09-10 01:42:00 +02:00
James M Snell
868b441f3e
test: begin normalizing fixtures use
...
Adds a new `../common/fixtures' module to begin normalizing
`test/fixtures` use. Our test code is a bit inconsistent with
regards to use of the fixtures directory. Some code uses
`path.join()`, some code uses string concats, some other
code uses template strings, etc. In mnay cases, significant
duplication of code is seen when accessing fixture files, etc.
This updates many (but by no means all) of the tests in the
test suite to use the new consistent API. There are still
many more to update, which would make an excelent Code-n-Learn
exercise.
PR-URL: https://github.com/nodejs/node/pull/14332
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2017-09-10 01:38:45 +02:00
James M Snell
c76ec7130e
test: improve multiple zlib tests
...
PR-URL: https://github.com/nodejs/node/pull/14455
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-09-10 01:37:52 +02:00
James M Snell
8fb0895176
test: improve multiple vm tests
...
PR-URL: https://github.com/nodejs/node/pull/14458
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
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: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
2017-09-10 01:37:27 +02:00
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
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
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
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
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
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
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