0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

671 Commits

Author SHA1 Message Date
Hassaan Pasha
3d0f2257be test: discard data received by client
This test was timing out after update to OpenSSL-1.1.1e.

PR-URL: https://github.com/nodejs/node/pull/32328
Fixes: https://github.com/nodejs/node/issues/32210
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-23 07:37:35 -07:00
Rich Trott
ecfb7b0988 test: replace countdown with Promise.all() in cluster-net-listen tests
PR-URL: https://github.com/nodejs/node/pull/32381
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-03-21 21:52:03 -07:00
Rich Trott
7d4dedbf6a test: replace Map with Array in cluster-net-listen tests
PR-URL: https://github.com/nodejs/node/pull/32381
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-03-21 21:51:59 -07:00
Matheus Marchini
2e3dc12ebd test: workaround for V8 8.1 inspector pause issue
`test-inspector-multisession-ws` and `test-inspector-break-when-eval`
will be affected by an upstream bug when we upgrade V8 to 8.1. The bug
is caused when the Inspector sets a pause at the start of a function
compiled with `CompileFunctionInContext`, but that function hasn't been
executed yet.

On both tests, this issue is triggered by pausing while in C++ executing
LookupAndCompile, which is called by requiring internal modules while
running `console.log`. To eliminate this issue in both tests, we add an
extra `console.log` to ensure we only pause we required all internal
modules we need. On `test-inspector-break-when-eval`, we also need to
start the child process with `--inspect-brk` instead of `--inspect` to
ensure the test is predictable (this test would occasianlly fail on
slower machines, when console.log doesn't run fast enough to finish
after emitting `Runtime.consoleAPICalled` and before the parent process
sending `Runtime.evaluate` message.

Ref: https://bugs.chromium.org/p/v8/issues/detail?id=10287

PR-URL: https://github.com/nodejs/node/pull/32234
Refs: https://bugs.chromium.org/p/v8/issues/detail?id=10287
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2020-03-16 00:23:53 +00:00
Myles Borins
e00e77e857
test: mark test-timers-blocking-callback flaky on osx
This is only for 10.15 but this test is periodically failing across
many CI runs. Would like to mark this as flaky so we can avoid lots
of red CI.

Refs: https://github.com/nodejs/node/issues/21781

PR-URL: https://github.com/nodejs/node/pull/32189
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2020-03-11 10:31:46 -04:00
Rich Trott
1b35e8402f test: remove superfluous checks in test-net-reconnect-error
The process.on('exit', ...) checks duplicate the work of
`common.mustCall()` and are superfluous. Remove them.

Signed-off-by: Rich Trott <rtrott@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/32120
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2020-03-08 08:25:38 -07:00
Rich Trott
4c6ef4b7e2 test: apply camelCase in test-net-reconnect-error
Rename two idnetifiers that were snake_case rather than camelCase.

Signed-off-by: Rich Trott <rtrott@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/32120
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2020-03-08 08:25:31 -07:00
Rich Trott
b1d4c13430 test: add coverage for FSWatcher exception
Cover an previously uncovered exception possible in the internal start
function for FSWatcher.

Signed-off-by: Rich Trott <rtrott@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/32057
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2020-03-05 07:10:05 -08:00
Rich Trott
616a729b38 test: remove common.expectsInternalAssertion
Remove convenience function for internal assertions. It is only used
once.

Signed-off-by: Rich Trott <rtrott@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/32057
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2020-03-05 07:10:01 -08:00
Rich Trott
5e1f059db4 test: move test-inspector-module to parallel
test-inspector-module is very fast and seems to be runnable at the same
time as other tests. Move from sequential directory to parallel.

PR-URL: https://github.com/nodejs/node/pull/32025
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-03-02 12:51:31 -08:00
Rich Trott
9ac42f1be4 test: remove common.port from test-tls-securepair-client
OpenSSL s_server accepts port 0 as an indicator to use an open port
provided by the operating system. Use that instead of common.PORT in the
test.

Remove 500ms delay added in 8e461673c4.
Hopefully the race condition in OpenSSL s_server has been fixed and/or
the change to port 0 means that the server is listening by the time
the ACCEPT text is printed and the setTimeout() is no longer necessary.

PR-URL: https://github.com/nodejs/node/pull/32024
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2020-03-02 12:50:06 -08:00
Rusty Conover
2b16c13f79 test: remove sequential/test-https-keep-alive-large-write.js
Remove a test that made a flawed assumption that a single
large buffer write can be interrupted by a timeout event.

PR-URL: https://github.com/nodejs/node/pull/31499
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-02-28 22:02:00 -08:00
cjihrig
1b2e2944bc
dgram: don't hide implicit bind errors
When dgram socket implicit binding fails, an attempt is made to
clean up the send queue. This was originally implemented using
an 'error' handler that performed cleanup and then emitted a
fake error, which concealed the original error. This was done
to prevent cases where the same error was emitted twice. Now
that the errorMonitor event is available, use that to perform
the cleanup without impacting the actual error handling.

PR-URL: https://github.com/nodejs/node/pull/31958
Refs: https://github.com/nodejs/help/issues/2484
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-02-27 21:01:32 -05:00
Anna Henningsen
875a4d1a58 worker: add ability to take heap snapshot from parent thread
PR-URL: https://github.com/nodejs/node/pull/31569
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-02-03 07:04:13 -08:00
legendecas
7b7e7bd185
src,lib: make ^C print a JS stack trace
If terminating the process with ctrl-c / SIGINT, prints a JS stacktrace
leading up to the currently executing code.

The feature would be enabled under option `--trace-sigint`.

Conditions of no stacktrace on sigint:

- has (an) active sigint listener(s);
- main thread is idle (i.e. uv polling), a message instead of stacktrace
  would be printed.

PR-URL: https://github.com/nodejs/node/pull/29207
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Christopher Hiller <boneskull@boneskull.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-01-28 13:52:27 +08: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
Xu Meng
262c66a851
test: skip the unsupported test cases for IBM i
This is a following PR of #30714.

PR-URL: https://github.com/nodejs/node/pull/30819
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-12-25 23:11:02 +01:00
Denys Otrishko
f8d7e2216e
tls: add PSK support
Add the `pskCallback` client/server option, which resolves an identity
or identity hint to a pre-shared key.

Add the `pskIdentityHint` server option to set the identity hint for the
ServerKeyExchange message.

Co-authored-by: Chris Osborn <chris.osborn@sitelier.com>
Co-authored-by: stephank <gh@stephank.nl>
Co-authored-by: Taylor Zane Glaeser <tzglaeser@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/23188
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-12-25 12:24:42 +01:00
Ruben Bridgewater
a03458396b
util: add colors to debuglog()
This adds colors to the passed through arguments in case the stream
supports colors. The PID will also be highlighted.

PR-URL: https://github.com/nodejs/node/pull/30930
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-12-25 11:09:16 +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
Ben Noordhuis
ba61253672 test: scale keepalive timeouts for slow machines
The test was using fixed timeouts and that seems to be causing sporadic
test failures on pi1-docker host (which is a very slow machine.)

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

PR-URL: https://github.com/nodejs/node/pull/30834
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-12-08 21:05:59 -08:00
João Reis
a2cfb7dd86 test: mark tests as flaky
PR-URL: https://github.com/nodejs/node/pull/30848
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-12-07 19:15:43 -08:00
cjihrig
aa363c49ea
test: remove common.busyLoop()
This commit replaces common.busyLoop() with sleep().

PR-URL: https://github.com/nodejs/node/pull/30787
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-12-06 22:03:00 -05:00
Maël Nison
1549c8e077 module: ignore resolution failures for inspect-brk
The resolution for the main entry point may fail when the resolution
requires a preloaded module to be executed first (for example when
adding new extensions to the resolution process). Silently skipping
such failures allow us to defer the resolution as long as needed
without having any adverse change (since the main entry point won't
resolve anyway if it really can't be resolved at all).

PR-URL: https://github.com/nodejs/node/pull/30336
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-12-04 23:30:25 -05:00
Rich Trott
2f077ddd29 test: use block-scoping in test-net-server-address
Use block-scoping in test-net-server-address. This also allows us to
easily rename some identifiers that were not camelCase.

PR-URL: https://github.com/nodejs/node/pull/30754
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-12-03 12:58:38 -08:00
Rich Trott
890d643b90 test: move test-child-process-fork-getconnections to parallel
Now that the test uses an open port assigned by the operating system
rather than a hardcoded common.PORT, it can be moved to parallel.

PR-URL: https://github.com/nodejs/node/pull/30749
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-12-03 03:36:20 -08:00
Rich Trott
4f5685d233 test: change common.PORT to arbitrary port
Change common.PORT to arbitrary port in
test-child-process-fork-getconnections to prepare for moving that test
from sequential to parallel.

PR-URL: https://github.com/nodejs/node/pull/30749
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-12-03 03:36:17 -08:00
Rich Trott
5b52a62ab1 test: move test-http-max-http-headers to parallel
test-http-max-http-headers seems to run fine in parallel, even with
`tools/test.py -j 96 --repeat 192
test/parallel/test-http-max-http-headers.js`.

The same applies to `test-set-http-max-http-headers.js` which (as
written) depends on `test-http-max-http-headers.js` being in the same
directory. So that is being moved too.

PR-URL: https://github.com/nodejs/node/pull/30712
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-12-01 02:42:27 -08:00
Rich Trott
05c5ebbe12 test: correct header length subtraction
In test-http-max-http-headers, a comment asks why we are subtracting 32
from the length of the invalid-length-by-1 headers instead of just 1.
Subtracting 1 seems to be correct and works.

PR-URL: https://github.com/nodejs/node/pull/30712
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-12-01 02:42:11 -08:00
Rich Trott
d2ea4cf0ed test: remove unused callback argument
PR-URL: https://github.com/nodejs/node/pull/30712
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-12-01 02:41:08 -08:00
Rich Trott
0132cddb6f test: simplify forEach() usage
Use an array literal instead of using split() on a very short string.

PR-URL: https://github.com/nodejs/node/pull/30712
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-12-01 02:41:03 -08:00
Rich Trott
179f6611d5 test: remove unused callback argument
PR-URL: https://github.com/nodejs/node/pull/30712
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-12-01 02:41:00 -08:00
Rich Trott
359766b2c3 benchmark,doc,lib,test: prepare for padding lint rule
Upcoming lint rule will require a blank line between consecutive
functions. Add it in the places where we don't have it already.

PR-URL: https://github.com/nodejs/node/pull/30696
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-11-30 06:28:29 -08:00
Rich Trott
99d1f6fea4 test: move test-https-server-consumed-timeout to parallel
Change the test to be robust in slow environments and move to parallel.
The previous version of the test failed for me in parallel with just two
or four simultaneous versions running. This version passes 96
simultaneous versions running, but still fails as designed if the
request writes fail to prevent the request timeout from occurring.

PR-URL: https://github.com/nodejs/node/pull/30677
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-11-28 22:41:13 -08:00
Rich Trott
721076b0b9 test: remove unnecessary common.platformTimeout() call
Applying platformTimeout() to the interval is counterproductive. It
should be applied to the request timeout duration only.

PR-URL: https://github.com/nodejs/node/pull/30677
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-11-28 22:40:06 -08:00
Rich Trott
527ee38757 test: do not skip test-http-server-consumed-timeout
test-http-server-consumed-timeout has code to that causes it to be
skipped on busy machines. Instead, use an exponential backoff for the
timeout if the machine is busy.

PR-URL: https://github.com/nodejs/node/pull/30677
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-11-28 22:40:03 -08:00
Rich Trott
f52fb0ac8f test: remove unused function argument from http test
Remove unused `res` from test-http-server-consumed-timeout.

PR-URL: https://github.com/nodejs/node/pull/30677
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-11-28 22:40:00 -08:00
Rich Trott
15146e6f37 test: add logging in case of infinite loop
test-inspector-contexts may be entering an infinite loop (or very
long-running loop) in CI, resulting in flakiness. Or maybe not. Add
logging to find out.

PR-URL: https://github.com/nodejs/node/pull/30649
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-11-27 22:39:51 -08:00
Rich Trott
9cefd619d8 test: remove destructuring from test-inspector-contexts
As I'm working with this test, I'm finding the destructuring of assert
and vm to make this test harder to read/understand. So I'm taking the
liberty of removing them.

PR-URL: https://github.com/nodejs/node/pull/30649
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-11-27 22:39:50 -08:00
Rich Trott
4325ca6829 test: check for session.post() errors in test-insepctor-context
If session.post() generates an error, it is currently ignored. Add check
for error by adding a callback to session.post() invocation.

PR-URL: https://github.com/nodejs/node/pull/30649
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-11-27 22:39:48 -08:00
Rich Trott
80c170e66f test: add mustCall() to test-inspector-contexts
In test-inspector-contexts, if mainContextPromise is modified such that
the `method` argument is changed to something invalid, the test still
passes and the second part of the test never runs. Use
`common.mustCall()` to cause the test to fail if the second part of the
test does not run.

Refs: https://github.com/nodejs/node/issues/30519#issuecomment-558476839

PR-URL: https://github.com/nodejs/node/pull/30649
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-11-27 22:39:46 -08:00
Rich Trott
ebb177ee22 test: move test-worker-prof to sequential
Refs: https://github.com/nodejs/node/issues/26401#issuecomment-557899953

PR-URL: https://github.com/nodejs/node/pull/30628
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-11-26 10:17:04 -08:00
Rich Trott
a6fd2828c6 test: use useful message argument in test function
The message argument of two test functions in
test-inspector-async-call-stack is useful but unused. Use it!

PR-URL: https://github.com/nodejs/node/pull/30618
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2019-11-25 21:33:13 -08:00
Rich Trott
110c25d5ac test: move stream test to parallel
I don't believe there's a reason test-stream-writable-clear-buffer needs
to be in sequential. Move it to parallel.

PR-URL: https://github.com/nodejs/node/pull/30561
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-11-22 11:41:25 -08:00
Rich Trott
c13f8fc80e test: remove string literal as message in strictEqual() in stream test
This reveals the values that cause the assertion error, should it
happen.

PR-URL: https://github.com/nodejs/node/pull/30561
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-11-22 11:41:21 -08:00
Rich Trott
ac43427ba7 test: use arrow function for callback in stream test
PR-URL: https://github.com/nodejs/node/pull/30561
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-11-22 11:41:14 -08:00
Rich Trott
bce58fd2cc test: replace setTimeout with setImmediate in stream test
Replace setTimeout() with setImmediate() in
test-stream-writable-clear-buffer. The test still fails in Node.js 8.6.0
(if you comment out the `common` module, since it uses BigInts and those
aren't supported in 8.6.0).

PR-URL: https://github.com/nodejs/node/pull/30561
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-11-22 11:41:11 -08:00
Grigoriy Levanov
35ec01097b test: replace Object.assign with object spread
Replaces Object.assign with spread where object is simply cloned

PR-URL: https://github.com/nodejs/node/pull/30306
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-11-12 17:19:22 -08:00
Michaël Zasso
2707efd27b
test: increase limit again for network space overhead test
On certain platforms, updating V8 to 7.9 made the numbers a bit higher
than the current limit.

PR-URL: https://github.com/nodejs/node/pull/30020
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-11-08 15:53:36 +01:00
Anna Henningsen
f7b5eacaa6 test: remove unnecessary --expose-internals flags
PR-URL: https://github.com/nodejs/node/pull/29886
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-10-10 11:59:31 -07:00