blade254353074
7c74402d3e
test: use template literals as appropriate
...
Replace string concatenation with template string literals in
test-graph.signal.js.
PR-URL: https://github.com/nodejs/node/pull/14289
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@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-07-19 15:02:45 -04:00
tobewhatwewant
b0946d07e0
test: use template literal for string concat
...
In test/parallel/test-repl-persistent-history.js, replace string
concatenation with a template literal.
PR-URL: https://github.com/nodejs/node/pull/14288
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-19 15:02:45 -04:00
jiangplus
36ef7e0b40
test: simplify string concatenation
...
Replace string concatenation with template literals.
Updated `test/parallel/test-http-multi-line-headers.js`
PR-URL: https://github.com/nodejs/node/pull/14278
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: David Cai <davidcai1993@yahoo.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-19 15:02:44 -04:00
kadoufall
7945debe52
util: delete unused argument 'depth'
...
In lib/util.js, Line 1056, there is a 'depth' argument that is unused
for 'process.versions[exports.inspect.custom]', so delete it.
PR-URL: https://github.com/nodejs/node/pull/14267
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-19 15:02:44 -04:00
Bang Wu
1205b1246b
test: use regexp to confir error message
...
In test/parallel/test-stream-writable-null.js, use a regular expression
to validate error message in assert.throws() call.
PR-URL: https://github.com/nodejs/node/pull/14268
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-19 15:02:44 -04:00
akira.xue
8756686fa7
test: use regluar expression in vm test
...
update test/parallel/test-vm-create-context-arg.js
in line 27 to change `TypeError` to the regular expression
with the `/^TypeError: sandbox must be an object$/`.
PR-URL: https://github.com/nodejs/node/pull/14266
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-07-19 15:02:43 -04:00
Flandre
cb92035ba7
test: use regular expression to match error msg
...
PR-URL: https://github.com/nodejs/node/pull/14265
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-07-19 15:02:43 -04:00
Song, Bintao Garfield
253e4d062d
test: replace string concat with template literal
...
Replace the string concat at test/addons-napi/test_reference/test.js.
PR-URL: https://github.com/nodejs/node/pull/14269
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-07-19 15:02:42 -04:00
Fraser Xu
7eafd966c2
test: check complete error message
...
In test-stream-writable-change-default-encoding, use a regular
expression to match the complete error message.
PR-URL: https://github.com/nodejs/node/pull/14264
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Bryan English <bryan@bryanenglish.com >
2017-07-19 15:02:42 -04:00
Rich Trott
b2ac926c5d
test: fix flaky test-net-can-reset-timeout
...
Use `.once()` rather than `.on()` for timeout listener.
Add comment with URL for issue explaining the purpose of the test. (h/t
refack)
PR-URL: https://github.com/nodejs/node/pull/14257
Fixes: https://github.com/nodejs/node/issues/14241
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
2017-07-19 15:02:41 -04:00
Refael Ackermann
d2e0f70ea6
test: disable MultipleEnvironmentsPerIsolate
...
This is a temporary measure until the issue is fixed.
PR-URL: https://github.com/nodejs/node/pull/14246
Refs: https://github.com/nodejs/node/issues/14206
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-07-19 15:02:41 -04:00
Refael Ackermann
7163e40337
test: make common.PIPE process unique
...
* includes a tiny bit of refactoring in adjacent lines.
* fixes 1 test and 1 benchmark that depended on PIPE being constant.
PR-URL: https://github.com/nodejs/node/pull/14168
Fixes: https://github.com/nodejs/node/issues/14128
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-07-19 15:02:41 -04:00
cornholio
05707a9e01
cluster: overriding inspector port
...
Added an option to override inspector port for workers using
`settings.inspectPort` will override default port incrementing behavior.
Also, using this option allows to set 0 port for the whole cluster.
PR-URL: https://github.com/nodejs/node/pull/14140
Fixes: https://github.com/nodejs/node/issues/8495
Fixes: https://github.com/nodejs/node/issues/12941
Refs: https://github.com/nodejs/node/pull/9659
Refs: https://github.com/nodejs/node/pull/13761
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-07-19 15:02:40 -04:00
cornholio
06ff0fc60a
test: reduce offset in test-inspector-port-cluster
...
10 ports for each test-case is too much.
Not enough ports for new test cases, considering ~100 ports per file.
PR-URL: https://github.com/nodejs/node/pull/14140
Fixes: https://github.com/nodejs/node/issues/8495
Fixes: https://github.com/nodejs/node/issues/12941
Refs: https://github.com/nodejs/node/pull/9659
Refs: https://github.com/nodejs/node/pull/13761
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-07-19 15:02:40 -04:00
cornholio
b45e255a9a
doc: fixes in cluster.md
...
* Capitalization and punctuation.
* `setupMaster` contained info about `settings` which where incomplete.
PR-URL: https://github.com/nodejs/node/pull/14140
Fixes: https://github.com/nodejs/node/issues/8495
Fixes: https://github.com/nodejs/node/issues/12941
Refs: https://github.com/nodejs/node/pull/9659
Refs: https://github.com/nodejs/node/pull/13761
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-07-19 15:02:39 -04:00
Peter Czibik
7a654eb418
test: http outgoing _renderHeaders
...
PR-URL: https://github.com/nodejs/node/pull/13981
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-19 15:02:39 -04:00
Vse Mozhet Byt
8490176b6f
util: remove redundant declaration
...
This module is already required in the top scope (Line 3).
PR-URL: https://github.com/nodejs/node/pull/14199
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Refael Ackermann <refack@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: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-07-19 15:02:38 -04:00
Vse Mozhet Byt
e28c9e88e5
benchmark: fix typo in inspect-proxy
...
PR-URL: https://github.com/nodejs/node/pull/14237
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-07-19 15:02:38 -04:00
James Sumners
b344687a5c
doc: update umask for clarity
...
PR-URL: https://github.com/nodejs/node/pull/14170
Fixes: https://github.com/nodejs/node/issues/14169
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-07-19 15:02:38 -04:00
starkwang
361c35e83d
doc: add notice about useGlobal option in repl docs
...
PR-URL: https://github.com/nodejs/node/pull/13866
Fixes: https://github.com/nodejs/node/issues/13827
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-07-19 15:02:37 -04:00
AJ Jordan
014f514b1d
tools: update package.json engine field
...
PR-URL: https://github.com/nodejs/node/pull/14165
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-07-19 15:02:37 -04:00
Michaël Zasso
8243ddc827
build: run test-hash-seed at the end of test-v8
...
The v8 and test-hash-seed targets cannot be run in parallel because they
need different copies of the deps/v8 directory.
Ref: https://github.com/nodejs/node/pull/14004#issuecomment-314774773
PR-URL: https://github.com/nodejs/node/pull/14219
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-07-19 15:02:36 -04:00
Evan Lucas
dfff6250db
build: allow enabling the --trace-maps flag in V8
...
This can be useful for tracing map creation.
Backport-PR-URL: https://github.com/nodejs/node/pull/14344
Backport-Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Backport-Reviewed-By: Refael Ackermann <refack@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/14018
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-19 15:02:36 -04:00
Kyle Farnung
d001c361a4
n-api: add napi_fatal_error API
...
PR-URL: https://github.com/nodejs/node/pull/13971
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-07-19 15:02:35 -04:00
Evan Lucas
e726f529cc
test: decrease duration of test-cli-syntax
...
Previously, test/parallel/test-cli-syntax.js was spawning a lot of child
processes, but using spawnSync, which made the test run each child
process serially. This switches most of the test cases to use exec so
that they are asynchronous. Locally, the test went from > 5 seconds to
under 2 seconds.
PR-URL: https://github.com/nodejs/node/pull/14187
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-19 15:02:35 -04:00
cjihrig
3ffd9387ed
test: handle missing V8 tests in n-api test
...
The N-API test testInstanceOf.js relies on several V8 test files
which may not exist in downloadable archives. If the files are
missing, this commit causes a warning to be emitted rather than
failing the test.
Refs: https://github.com/nodejs/node/issues/14113
Fixes: https://github.com/nodejs/node/issues/13344
PR-URL: https://github.com/nodejs/node/pull/14123
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-07-19 15:02:34 -04:00
cjihrig
a3dc3f705c
deps: upgrade libuv to 1.13.1
...
PR-URL: https://github.com/nodejs/node/pull/14117
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-07-19 15:02:34 -04:00
Andreas Madsen
7f87876cb7
async_hooks: make AsyncResource match emitInit
...
AsyncResource previously called emitInitNative. Since AsyncResource is
just an abstraction on top of the emitEventScript functions, it should
call emitInitScript instead.
PR-URL: https://github.com/nodejs/node/pull/14152
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-07-19 15:02:33 -04:00
Andreas Madsen
54361111f2
async_hooks: rename internal emit functions
...
There are two categories of emit functions in async_hooks, those used by
c++ (native) and those used by JavaScript (script). Previously these
were named N for native and S for script. Finally, there was an odd case
where emitInitN was called just init. This makes it more explicit by
using the names emitInitNative and emitInitScript. The other emit
functions are also renamed.
PR-URL: https://github.com/nodejs/node/pull/14152
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-07-19 15:02:33 -04:00
Andreas Madsen
90a3b86e5d
async_hooks: fix nested hooks mutation
...
In some cases restoreTmpHooks is called too early, this causes
active_hooks_array to change during execution of the init hooks.
PR-URL: https://github.com/nodejs/node/pull/14143
Ref: https://github.com/nodejs/node/pull/14054#issuecomment-313915193
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-07-19 15:02:33 -04:00
Ruben Bridgewater
3388e319fa
async_hooks: move restoreTmpHooks call to init
...
This fixes an error that could occure by nesting async_hooks calls
PR-URL: https://github.com/nodejs/node/pull/14054
Ref: https://github.com/nodejs/node/pull/13755#issuecomment-312616004
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
2017-07-19 15:02:32 -04:00
Rich Trott
43c614edfe
tools: increase test timeouts
...
At least temporarily until snapshots are restored, increase timeout for
tests. Tests that spawn many processes are timing out across many
platforms on CI.
PR-URL: https://github.com/nodejs/node/pull/14197
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-07-19 15:02:32 -04:00
Rich Trott
c8f2d26632
tools: update ESLint to 4.2.0
...
ESLint 4.2.0 contains a fix for a bug that is blocking us from moving to
the non-legacy stricter indentation linting. Update to 4.2.0 to remove
the blocking issue.
PR-URL: https://github.com/nodejs/node/pull/14155
Ref: https://github.com/eslint/eslint/issues/8882
Ref: https://github.com/eslint/eslint/pull/8885
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-19 15:02:31 -04:00
Rich Trott
fe3833e85a
child_process: refactor normalizeSpawnArguments()
...
Code is not in hot path. Refactor ternary to be more readable if/else
block that mirrors analogous code elsewhere in the function. Change
string concatenation to template literal.
PR-URL: https://github.com/nodejs/node/pull/14149
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-19 15:02:30 -04:00
Roman Shoryn
1a27ffdd35
doc: prefix of the stacktrace in errors.md
...
PR-URL: https://github.com/nodejs/node/pull/14150
Fixes: https://github.com/nodejs/node/issues/5675
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Kunal Pathak <kunal.pathak@microsoft.com >
2017-07-19 15:02:30 -04:00
Trevor Norris
292ad3061d
test,async_hooks: match test-ttywrap.readstream
...
Match changes made to test-ttywrap.readstream for consistency.
PR-URL: https://github.com/nodejs/node/pull/13991
Fixes: https://github.com/nodejs/node/issues/13984
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-19 15:02:30 -04:00
Trevor Norris
fc74f0ea65
test,async_hooks: skip whether TTY is available
...
If TTY isn't available then the test will always fail. Also use the
already available process.stdin instead of opening another ReadStream.
PR-URL: https://github.com/nodejs/node/pull/13991
Fixes: https://github.com/nodejs/node/issues/13984
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-19 15:02:29 -04:00
Kyle Farnung
e5e8291da1
n-api: wrap test macros in do/while
...
PR-URL: https://github.com/nodejs/node/pull/14095
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-07-19 15:02:29 -04:00
Gabriel Schulhof
2a3a6f1938
n-api: Implement stricter wrapping
...
Use a stronger criterion to identify objects in the prototype chain that store
pointers to native data that were added by previous calls to `napi_wrap()`.
Whereas the old criterion for identifying `napi_wrap()`-injected prototype
chain objects was to consider an object with an internal field
count of 1 to be such an object, the new criterion is to consider an object
with an internal field count of 2 such that the second field holds a
`v8::External` which itself contains a pointer to a global static string unique
to N-API to be a `napi_wrap()`-injected prototype chain object.
This greatly reduces the possibility of returning a pointer that was not
previously added with `napi_wrap()`, and it allows us to recognize that an
object has already undergone `napi_wrap()` and we can thus prevent a chain of
wrappers only the first of which is accessible from appearing in the prototype
chain, as would be the result of multiple calls to `napi_wrap()` using the same
object.
PR-URL: https://github.com/nodejs/node/pull/13872
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
2017-07-19 15:02:28 -04:00
Rich Trott
7827aa9549
test: reduce run time for test-benchmark-crypto
...
Specify options to reduce combinations of benchmarks run during testing.
This reduces the run time by approximately 30% and will hopefully allow
Raspberry Pi 1 devices in CI to finish the test.
PR-URL: https://github.com/nodejs/node/pull/14189
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-07-19 15:02:28 -04:00
Rich Trott
f23d533168
test: reduce run time for test-benchmark-http
...
Specify more configuration options to reduce run time by about a third.
PR-URL: https://github.com/nodejs/node/pull/14180
Fixes: https://github.com/nodejs/node/issues/14177
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-07-19 15:02:27 -04:00
Rich Trott
6c23e0a3e0
test: reduce test-benchmark-net run duration
...
Set configuration option to reduce combinations of benchmark settings
tried in test, reducing execution time by about 50%.
PR-URL: https://github.com/nodejs/node/pull/14183
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-19 15:02:27 -04:00
Timothy Gu
33003bff4e
doc: add missing space
...
PR-URL: https://github.com/nodejs/node/pull/14181
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2017-07-19 15:02:27 -04:00
Timothy Gu
6ddc0d6f24
querystring: fix up lastPos usage
...
Use lastPos ONLY for tracking what has been .slice()'d, never as an
indication of if key/value has been seen, since lastPos is updated on
seeing + as well.
PR-URL: https://github.com/nodejs/node/pull/14151
Fixes: https://github.com/nodejs/node/issues/13773
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
2017-07-19 15:02:26 -04:00
Rich Trott
14dbecb932
buffer: remove MAX_SAFE_INTEGER check on length
...
MAX_SAFE_INTEGER is millions of times larger than the largest buffer
allowed in Node.js. There is no need to squash the length down to
MAX_SAFE_INTEGER. Removing that check results in a small but
statistically significant increase for Buffer.from() operating on
ArrayBuffers in some situations.
PR-URL: https://github.com/nodejs/node/pull/14131
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-07-19 15:02:26 -04:00
Rich Trott
07a5b15bae
test: fix flaky test-https-set-timeout-server
...
Because of a race condition, connection listener may not be invoked if
test is run under load. Remove `common.mustCall()` wrapper from the
listener. Move the test to `parallel` because it now works under load.
Make similar change to http test to keep them in synch even though it is
much harder to trigger the race in http.
PR-URL: https://github.com/nodejs/node/pull/14134
Fixes: https://github.com/nodejs/node/issues/14133
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
2017-07-19 15:02:25 -04:00
Rich Trott
7f2b5d305d
test: remove common.noop
...
This change removes `common.noop` from the Node.js internal testing
common module.
Over the last few weeks, I've grown to dislike the `common.noop`
abstraction.
First, new (and experienced) contributors are unaware of it and so it
results in a large number of low-value nits on PRs. It also increases
the number of things newcomers and infrequent contributors have to be
aware of to be effective on the project.
Second, it is confusing. Is it a singleton/property or a getter? Which
should be expected? This can lead to subtle and hard-to-find bugs. (To
my knowledge, none have landed on master. But I also think it's only a
matter of time.)
Third, the abstraction is low-value in my opinion. What does it really
get us? A case could me made that it is without value at all.
Lastly, and this is minor, but the abstraction is wordier than not using
the abstraction. `common.noop` doesn't save anything over `() => {}`.
So, I propose removing it.
PR-URL: https://github.com/nodejs/node/pull/12822
Backport-PR-URL: https://github.com/nodejs/node/pull/14174
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-19 15:02:25 -04:00
Andreas Madsen
3faeb49d94
async_hooks: C++ Embedder API overhaul
...
* Fix AsyncHooksGetTriggerAsyncId such it corresponds to
async_hooks.triggerAsyncId and not async_hooks.initTriggerId.
* Use an async_context struct instead of two async_uid values.
This change was necessary since the fixing
AsyncHooksGetTriggerAsyncId otherwise makes it impossible to
get the correct default trigger id. It also prevents an invalid
triggerAsyncId in MakeCallback.
* Rename async_uid to async_id for consistency
* Rename get_uid to get_async_id
* Add get_trigger_async_id to AsyncResource class
PR-URL: https://github.com/nodejs/node/pull/14040
Backport-PR-URL: https://github.com/nodejs/node/pull/14109
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-07-19 15:02:24 -04:00
jklepatch
229748c756
doc: removed redundant mentions to error codes
...
PR-URL: https://github.com/nodejs/node/pull/13627
Backport-PR-URL: https://github.com/nodejs/node/pull/14175
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-07-19 15:02:24 -04:00
Evan Lucas
8887a5766d
test: add get/set effective uid/gid tests
...
3c92ca2b5c should have had tests
to go along with it. This adds tests for the following functions:
* `process.geteuid()`
* `process.seteuid()`
* `process.getegid()`
* `process.setegid()`
PR-URL: https://github.com/nodejs/node/pull/14091
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-07-19 15:02:23 -04:00