Aleksei Koziatinskii
23119cacf8
inspector: supported NodeRuntime domain in worker
...
NodeRuntime domain was introduced to give inspector client way to
fetch captured information before Node process is gone. We need
similar capability for work.
With current protocol inspector client can force worker to wait
on start by passing waitForDebuggerOnStart flag to NodeWorker.enable
method. So client has some time to setup environment, e.g. start
profiler. At the same time there is no way to prevent worker from
being terminated. So we can start capturing profile but we can not
reliably get captured data back.
This PR implemented NodeRuntime.notifyWhenWaitingForDisconnect
method for worker. When NodeRuntime.waitingForDisconnect notification
is enabled, worker will wait for explicit NodeWorker.detach call.
With this PR worker tooling story is nicely aligned with main thread
tooling story. The only difference is that main thread by default is
waiting for disconnect but worker thread is not waiting.
Issue: https://github.com/nodejs/node/issues/27677
PR-URL: https://github.com/nodejs/node/pull/27706
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
2019-06-03 13:14:25 +02:00
Rich Trott
6a5ce36fb8
test: handle unknown message type in worker threads
...
Check that main thread handles an unknown message type from a worker
thread as expected.
PR-URL: https://github.com/nodejs/node/pull/27995
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-06-03 13:14:25 +02:00
Rich Trott
182725651b
test: add coverage for unserializable worker thread error
...
Check that the main thread handles unserializable errors in a worker
thread as expected.
PR-URL: https://github.com/nodejs/node/pull/27995
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-06-03 13:14:25 +02:00
Marcos Casagrande
a47ee80114
stream: convert string to Buffer when calling unshift(<string>)
...
`readable.unshift` can take a string as an argument, but that
string wasn't being converted to a Buffer, which caused a
<TypeError: Argument must be a buffer> in some cases. Also if a
string was passed, that string was coerced to utf8 encoding.
A second optional argument `encoding` was added to `unshift` to
fix the encoding issue.
Fixes: https://github.com/nodejs/node/issues/27192
PR-URL: https://github.com/nodejs/node/pull/27194
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-03 13:14:24 +02:00
Daniel Nalborczyk
887dd604f1
test: simplify fs promises test
...
Simplify test, fix comment.
PR-URL: https://github.com/nodejs/node/pull/27242
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Masashi Hirano <shisama07@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-03 13:14:24 +02:00
Refael Ackermann
2ce24a9452
tools: fix js2c regression
...
PR-URL: https://github.com/nodejs/node/pull/27980
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2019-06-02 15:15:25 +02:00
Keroosha
9229825496
test: covering destroying when worker already disconnected
...
This test covers 374 line in lib/internal/cluster/master
that was uncovered by previous tests
PR-URL: https://github.com/nodejs/node/pull/27896
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-06-02 15:15:25 +02:00
Anatoli Papirovski
24eaeed393
http: fix socketOnWrap edge cases
...
Properly handle prependListener wrapping on http server
socket, in addition to on and addListener.
PR-URL: https://github.com/nodejs/node/pull/27968
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-02 15:15:23 +02:00
Luigi Pinca
8b38dfbf39
http: call write callback even if there is no message body
...
Ensure that the callback of `OutgoingMessage.prototype.write()` is
called when `outgoingMessage._hasBody` is `false` (HEAD method, 204
status code, etc.).
Refs: https://github.com/nodejs/node/pull/27709
PR-URL: https://github.com/nodejs/node/pull/27777
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-01 18:29:47 +02:00
Ujjwal Sharma
10bdd13972
test: rename test-performance to test-perf-hooks
...
Rename test-performance to test-perf-hooks to better match its function
Refs: https://github.com/nodejs/node/pull/27884#issuecomment-497270542
PR-URL: https://github.com/nodejs/node/pull/27969
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-06-01 18:29:47 +02:00
went.out
6129376cd9
test: add coverage for sparse array maxArrayLength
...
code and learn task for additional coverage for situation when
maxArrayLength option is passed to util.inspect for sparse array
and is set to number lower than actual number of entries
PR-URL: https://github.com/nodejs/node/pull/27901
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-06-01 18:29:46 +02:00
Richard Lau
cc69d5af8e
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 18:29:46 +02:00
Mikhail Kuklin
38e3827ca8
test: add util inspect null getter test
...
PR-URL: https://github.com/nodejs/node/pull/27884
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
2019-05-31 08:52:27 +02:00
Evgenii Shchepotev
0e1ce2055e
test: rsa-pss generateKeyPairSync invalid option hash
...
PR-URL: https://github.com/nodejs/node/pull/27883
Reviewed-By: Ujjwal Sharma <usharma1998@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: Rich Trott <rtrott@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2019-05-31 08:47:03 +02:00
Michaël Zasso
d406785814
src: unimplement deprecated v8-platform methods
...
This removes the implementations of NodePlatform::CallOnForegroundThread
and NodePlatform::CallDelayedOnForegroundThread and updates the
test_platform cctest to stop using them.
PR-URL: https://github.com/nodejs/node/pull/27872
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-05-31 08:46:57 +02:00
Evgenii Shchepotev
0d74198123
test: cover import of a *.node file with a policy manifest
...
Cover import of a *.node file with a policy manifest. Add invalid
integrity test case.
PR-URL: https://github.com/nodejs/node/pull/27903
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-05-31 08:46:57 +02:00
Alexander Avakov
9220a68a76
crypto: fix KeyObject handle type error message
...
Fix KeyObject handle type error message. Add test to cover KeyObject
ERR_INVALID_ARG_TYPE exception.
PR-URL: https://github.com/nodejs/node/pull/27904
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-05-31 08:46:56 +02:00
Yuriy Vasiyarov
33236b7c54
src: export number_of_native_contexts and number_of_detached_contexts
...
export number_of_native_contexts and number_of_detached_contexts as
part of v8.getHeapStatistics()
PR-URL: https://github.com/nodejs/node/pull/27933
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-05-31 08:46:56 +02:00
Anna Henningsen
5eccd642ef
stream: convert existing buffer when calling .setEncoding
...
Convert already-stored chunks when `.setEncoding()` is called
so that subsequent `data` events will receive decoded strings,
as they expect.
Fixes: https://github.com/nodejs/node/issues/27932
PR-URL: https://github.com/nodejs/node/pull/27936
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-05-31 08:46:56 +02:00
Sam Roberts
6548b91835
tls: trace errors can show up as SSL errors
...
Calls to TLS_trace might leave errors on the SSL error stack, which then
get reported as SSL errors instead of being ignored. Wrap TLS_trace to
keep the error stack unchanged.
Fixes: https://github.com/nodejs/node/issues/27636
PR-URL: https://github.com/nodejs/node/pull/27841
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2019-05-31 08:46:56 +02:00
Alex Pry
25eb05a97a
lib: removed unnecessary fs.realpath options arg check + tests
...
Removed duplicated check for options argument of fs.realpath.
Added some tests which covering the cases for passing options arg
as null.
PR-URL: https://github.com/nodejs/node/pull/27909
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-05-31 08:46:56 +02:00
oksana
6f9aa3f722
test: add test cases for paramEncoding 'explicit'
...
PR-URL: https://github.com/nodejs/node/pull/27900
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-05-31 08:46:55 +02:00
Evgenii Shchepotev
682319f449
test: switch assertEqual arguments
...
PR-URL: https://github.com/nodejs/node/pull/27910
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-05-31 08:46:55 +02:00
Brian White
449ee8dd42
console: fix table() output
...
Fixes: https://github.com/nodejs/node/issues/27915
PR-URL: https://github.com/nodejs/node/pull/27917
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-05-31 08:46:55 +02:00
Grigory Gorshkov
b5b234deff
test: add testcase for SourceTextModule custom inspect
...
PR-URL: https://github.com/nodejs/node/pull/27889
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2019-05-31 08:46:53 +02:00
Alexander Avakov
630cc3ac30
test: cover util.inspect on boxed primitive with colors
...
PR-URL: https://github.com/nodejs/node/pull/27897
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-05-31 08:46:53 +02:00
Anna Henningsen
83aaef87d0
http2: fix tracking received data for maxSessionMemory
...
Track received data correctly. Specifically, for the buffer that
is used for receiving data, we previously would try to increment
the current memory usage by its length, and later decrement it
by that, but in the meantime the buffer had been turned over to V8
and its length reset to zero. This gave the impression that more and
more memory was consumed by the HTTP/2 session when it was in fact not.
Fixes: https://github.com/nodejs/node/issues/27416
Refs: https://github.com/nodejs/node/pull/26207
PR-URL: https://github.com/nodejs/node/pull/27914
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-05-31 08:46:52 +02:00
Levin Eugene
67b692bdb9
test: add test case for checking typeof mgf1Hash
...
add test case to cover uncovered test mgf1Hash param of generateKeyPair,
check typeof
PR-URL: https://github.com/nodejs/node/pull/27892
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2019-05-31 08:46:52 +02:00
Evgenii Shchepotev
2a509d40f4
test: switch assertEqual arguments
...
PR-URL: https://github.com/nodejs/node/pull/27912
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-05-31 08:46:52 +02:00
Alba Mendez
6cd64c8279
doc,test: clarify that Http2Stream is destroyed after data is read
...
Correct docs to clarify that behaviour,
and fix a race condition in test-http2-large-write-destroy.js.
Fixes: https://github.com/nodejs/node/issues/27863
PR-URL: https://github.com/nodejs/node/pull/27891
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-05-31 08:46:52 +02:00
Levin Eugene
3ba354aaaa
test: add test for util.inspect
...
add test case for util.inspect with 'depth' option set to 'null'
and with that has a custom inspect function attached
PR-URL: https://github.com/nodejs/node/pull/27906
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-05-31 08:46:51 +02:00
Luigi Pinca
8c35198499
http2: support net.Server options
...
Make `http2.createServer()` support `net.Server` options.
PR-URL: https://github.com/nodejs/node/pull/27782
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-05-28 07:47:52 +02:00
Joyee Cheung
313077ea62
test: expect wpt/encoding/encodeInto.any.js to fail
...
Since we do not implement TextEncoder.prototype.encodeInto
PR-URL: https://github.com/nodejs/node/pull/27860
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-05-28 07:33:38 +02:00
Joyee Cheung
8fc6914d09
test: update wpt/encoding to 7287608f90
...
Using `git node wpt encoding`
PR-URL: https://github.com/nodejs/node/pull/27860
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-05-28 07:33:37 +02:00
Joyee Cheung
0f86c2b185
test: run WPT in subdirectories
...
For a directory like this:
- wpt
- encoding
- streams
- backpressure.any.js
- api-basics.any.js
Previously we only run `api-basics.any.js`, now we also run
`backpressure.any.js` (and any tests in more deeply nested
directories). This enables us to run more of WPT since not
every module put their tests at the top level directory.
PR-URL: https://github.com/nodejs/node/pull/27860
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-05-28 07:33:37 +02:00
Joyee Cheung
51ccdae445
test: expect wpt/encoding/streams to fail
...
Since we do not implement TextDecoderStream or TextEncoderStream.
PR-URL: https://github.com/nodejs/node/pull/27860
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-05-28 07:33:37 +02:00
martyns0n
652cadba1c
test: fix arguments order of comparsion functions
...
Place actual values as the first agruments and expected as the second.
PR-URL: https://github.com/nodejs/node/pull/27907
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2019-05-28 07:33:37 +02:00
Evgenii Shchepotev
b117f6d5d8
test: switch assertEqual arguments
...
PR-URL: https://github.com/nodejs/node/pull/27913
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-05-28 07:33:36 +02:00
MurkyMeow
e7966bcb80
test: unhardcode server port
...
This is needed to avoid possible conflicts when running multiple tests
in parallel
PR-URL: https://github.com/nodejs/node/pull/27908
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2019-05-28 07:33:36 +02:00
Grigorii K. Shartsev
b83571d236
test: add a test case for the path.posix.resolve
...
In posix path.resolve should handle relative paths to be safe
even if process.cwd fails.
At lib/path.js#999 :
return resolvedPath.length > 0 ? resolvedPath : '.';
Else branch wasn't covered.
Add a test case to cover this.
PR-URL: https://github.com/nodejs/node/pull/27905
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
2019-05-28 07:33:36 +02:00
Kopachyov Vitaliy
f5bb1b380f
test: switch actual value argument and expected in deepStrictEqual call
...
Replace deepStrictEqual call to have actual value as the first argument
and the expected value as the second.
Change expectedRecvData definition in single place.
PR-URL: https://github.com/nodejs/node/pull/27888
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-05-28 07:33:35 +02:00
Grigorii K. Shartsev
531669b917
test: fix test-http2-multiheaders-raw
...
Arguments of deepStrictEqual were in incorrect order. Swap
first argument (actual value) with the second one (expected
value) to make the order correct.
PR-URL: https://github.com/nodejs/node/pull/27885
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
2019-05-28 07:33:35 +02:00
oksana
724d9c89bc
test: change expected and actual values in assert call
...
PR-URL: https://github.com/nodejs/node/pull/27881
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2019-05-28 07:33:35 +02:00
Joyee Cheung
d99e70381e
inspector: implement --heap-prof
...
In addition implements --heap-prof-name, --heap-prof-dir and
--heap-prof-interval.
These flags are similar to --cpu-prof flags but they are meant
for the V8 sampling heap profiler instead of the CPU profiler.
PR-URL: https://github.com/nodejs/node/pull/27596
Fixes: https://github.com/nodejs/node/issues/27421
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-05-28 07:33:35 +02:00
cjihrig
34ef9e4a2b
test: detect missing postmortem metadata
...
This commit updates test-postmortem-metadata to provide a
more useful error message in the scenario where Node is
compiled without postmortem support.
PR-URL: https://github.com/nodejs/node/pull/27828
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-05-28 07:33:33 +02:00
Luigi Pinca
10e0d7f2ac
tls: support the hints option
...
Make `tls.connect()` support the `hints` option for feature parity with
`net.connect()`.
PR-URL: https://github.com/nodejs/node/pull/27816
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-05-28 07:33:31 +02:00
Rich Trott
bfcbab4c0c
test: fix test-https-agent-additional-options
...
test-https-agent-additional-options can occasionally fail if a socket
closes before the checks near the end of the test. Modify the test to
check the freeSockets pool after each request.
PR-URL: https://github.com/nodejs/node/pull/27830
Fixes: https://github.com/nodejs/node/issues/24449
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-05-28 07:33:31 +02:00
Rich Trott
a4c1fd5ffc
test: refactor test-https-agent-additional-options
...
Move callback to location where it is less confusing.
PR-URL: https://github.com/nodejs/node/pull/27830
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-05-28 07:33:31 +02:00
Rich Trott
17abc8c942
test: favor arrow functions for anonymous callbacks
...
In test-https-agent-additional-options, use arrow functions for
anonymous callbacks. Replace a use of `this` with the relevant constant.
PR-URL: https://github.com/nodejs/node/pull/27830
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-05-28 07:33:30 +02:00
Rich Trott
155b947251
test: replace flag with option
...
test-https-agent-additional-options is invoked with a command-line flag.
However, there is an equivalent option that can be enabled within the
code. Do that instead.
PR-URL: https://github.com/nodejs/node/pull/27830
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-05-28 07:33:30 +02:00