fix description about the latest LTS release download page
to make it clear
PR-URL: https://github.com/nodejs/node/pull/4583
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
It avoids the creation of unnecessary handles. This issue is causing
intermitent failures in `test-cluster-disconnect-race` on `FreeBSD`
and `OS X`.
The problem is that the `worker2.disconnect` is being called on the
master before the `queryServer` is handled, causing the worker to
be deleted, then the Server handle is created afterwards. Later on,
when `removeWorker` is called from the `exit` handler, there are no
workers left, but one handle, thus the `AssertionError`.
Add a new `test/sequential/test-cluster-disconnect-leak` based on
`test-cluster-disconnect-race` that creates lots of workers and fails
consistently without this patch.
PR-URL: https://github.com/nodejs/node/pull/4465
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Adds Evan Lucas and his public key to the README for releases
PR-URL: https://github.com/nodejs/node/pull/4579
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Adds Myles Borins and his public key to the README
PR-URL: https://github.com/nodejs/node/pull/4578
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Make default `clientError` behavior (close socket immediately)
overridable. With this APIs it is possible to write a custom error
handler, and to send, for example, a 400 HTTP response.
http.createServer(...).on('clientError', function(err, socket) {
socket.end('HTTP/1.1 400 Bad Request\r\n\r\n');
socket.destroy();
});
Fix: #4543
PR-URL: https://github.com/nodejs/node/pull/4557
Reviewed-By: Brian White <mscdex@mscdex.net>
`clientError` will have `http.Server`-specific behavior, and we don't
want to shadow it in `tls.Server`.
PR-URL: https://github.com/nodejs/node/pull/4557
Reviewed-By: Brian White <mscdex@mscdex.net>
General improvements to crypto.markdown including new and
revised examples.
PR-URL: https://github.com/nodejs/node/pull/4435
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
The description of "[start[, end]]" in the doc shows warning of
"invalid param" when parsing an optional parameter in the section.
This fixes insufficient trimming of right square brackets.
PR-URL: https://github.com/nodejs/node/pull/4537
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
tools/doc/html.js in make doc throws an error in checking a heading
level in the markdown file.
PR-URL: https://github.com/nodejs/node/pull/4537
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Remove unused vars in tests
PR-URL: https://github.com/nodejs/node/pull/4536
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/4534
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
1c85849973 "fixed"
test-domain-exit-dispose-again by changing its logic to test that
process.domain was cleared properly in case an error was thrown from a
timer's callback.
However, it became clear when reviewing a recent change that refactors
lib/timers.js that it was not quite the intention of the original test.
Thus, this change adds the original implementation of
test-domain-exit-dispose-again back, with comments that make its
implementation easier to understand.
It also preserve the changes made by
1c85849973, but it moves them to a new
test file named test-timers-reset-process-domain-on-throw.js.
PR: #4256
PR-URL: https://github.com/nodejs/node/pull/4256
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Remove all remaining unused variables from tests in test/parallel.
PR-URL: https://github.com/nodejs/node/pull/4511
Reviewed-By: James M Snell<jasnell@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
This change adds a new event handler to the `error` event of the socket
after it has been used by the http_client.
The purpose of this change is to catch errors on *keep alived*
connections from idle sockets that otherwise will cause an uncaugh error
event on the application.
Fix: #3595
PR-URL: https://github.com/nodejs/node/pull/4482
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Use common.platformTimeout() to fix flaky
test-stream2-readable-empty-buffer-no-eofi on Raspberry Pis.
Fixes: https://github.com/nodejs/node/issues/4493
PR-URL: https://github.com/nodejs/node/pull/4516
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell<jasnell@gmail.com>
Three tests designated as flaky on Linux have not failed on the
continuous integration server in a long time. Removing flaky designation
for these tests.
Fixes: https://github.com/nodejs/node/issues/4446
PR-URL: https://github.com/nodejs/node/pull/4519
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
General improvements to dgram.markdown copy
PR-URL: https://github.com/nodejs/node/pull/4437
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Stephan Belanger <admin@stephenbelanger.com>
If uv_interface_addresses() returns UV_ENOSYS then interfaces and count
are uninitialised. This can cause a segmentation fault inside
GetInterfaceAddresses when it tries to use the invalid interfaces[].
Fix the issue by returning from GetInterfaceAddresses on the UV_ENOSYS
error.
This issue was observed when using uCLibc-ng version 1.0.9 because
uv_interface_addresses() in deps/uv/src/unix/linux-core.c incorrectly
undefines HAVE_IFADDRS_H.
Signed-off-by: Martin Bark <martin@barkynet.com>
PR-URL: https://github.com/nodejs/node/pull/4272
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
`setTimeout()`, `setInterval()` and `setIntermediate` currently
throw errors when receiving non-function objects as their first
argument, but only do so when trying to execute the callback,
i.e. after the waited time has passed. This may complicate
debugging when a lot of calls to `setTimeout()`/etc. are involved,
so failing as early as possible seems like a good idea.
`setTimeout()` historically ignored an falsy first
argument, while the other functions do not and throw instead.
This patch changes this behaviour to make all three match and
adds remarks in the corresponding documentation.
PR-URL: https://github.com/nodejs/node/pull/4362
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
PR-URL: https://github.com/nodejs/node/pull/4357
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
test-child-process-fork-net2.js checks that things happen within
certain time constraints, thus doubling as a benchmark test in addition
to a functionality test.
This change removes the time check, as it was causing the test to fail
on SmartOS and Windows (and possibly elsewhere) when the tests were
run in parallel on CI. There is no guarantee that other tests won't
consume enough resources to slow this test down, so don't check the time
constraints (beyond the generous timeout that the test is given by
test.py in the first place, of course).
If we want to do benchmark/performance tests, we should keep them
separate from pure functionality tests. The time check may have been a
remnant of the distant past when Node.js was much slower. It predates
io.js
Ref: https://github.com/nodejs/node/pull/4476
PR-URL: https://github.com/nodejs/node/pull/4494
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Refactor test to remove unnecessary booleans and one unnecesary timer.
Instead, throw Error objects where appropriate and rely on
common.mustCall().
The timer seemed to be the source of an issue when parallelizing tests.
Ref: https://github.com/nodejs/node/pull/4476#issuecomment-168080875
PR-URL: https://github.com/nodejs/node/pull/4490
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
test-fs-realpath.js was writing files to the fixture dir. This changes
it to use the temp directory instead. This also replaces some of the
string concatenation for paths with uses of path.join() and
path.relative().
PR-URL: https://github.com/nodejs/node/pull/4489
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Many tests use require() to import modules that subsequently never gets
used. This removes those imports and, in a few cases, removes other
unused variables from tests.
PR-URL: https://github.com/nodejs/node/pull/4475
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Add a comment to clarify how the tests work and their purpose.
Also removes unnecessary assignment of domain module to a variable.
PR-URL: https://github.com/nodejs/node/pull/4474
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
In some virtualized environments the amount of available resources
are misleading; for instance `multiprocessing.cpu_count()` on our current
4-core smartos vm's returns `48`. This is not a bug, merely how the vm
host provides information about available hardware.
Avoid running into issues by overriding `cpu_count()` with `JOBS`.
PR-URL: https://github.com/nodejs/node/pull/4495
Reviewed-By: Brian White <mscdex@mscdex.net>
Improves the message when an assertion fires in the
test-net-pipe-connect-errors so that it indicates the incorrect value
received rather than merely reporting that the value is incorrect.
PR-URL: https://github.com/nodejs/node/pull/4461
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Move argument validation out of C++ and into JS. Improves performance
by about 15-20%.
PR-URL: https://github.com/nodejs/node/pull/4484
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This fixes CI failures for test-net-pipe-connect-errors on Raspberry Pi
devices.
PR-URL: https://github.com/nodejs/node/pull/4478
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/4455
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
State a time unit for the timeout parameter in ClientRequest#setTimeout
PR-URL: https://github.com/nodejs/node/pull/4458
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/4390
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
The `util.format()` is used frequently, make the method faster
is better.
R-URL: https://github.com/nodejs/node/pull/3964
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Occasionally test-http-client-onerror will fail with a refused connection.
This patch fixes the possibility that connections will be attempted before
server is listening.
PR-URL: https://github.com/nodejs/node/pull/4346
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
Many test modules load assert but do not use it. This change removes
those instances.
It also removes a handful of other unused variables when they were
nearby.
PR-URL: https://github.com/nodejs/node/pull/4438
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
General improvements to debugger.markdown
PR-URL: https://github.com/nodejs/node/pull/4436
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
In http.agent, all other options are directly accessed through
`self.` not `self.options`.
PR-URL: https://github.com/nodejs/node/pull/4407
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
General improvements to events.markdown copy including a
bit of restructuring and improved examples
PR-URL: https://github.com/nodejs/node/pull/4468
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
General improvements to dns.markdown copy and examples
PR-URL: https://github.com/nodejs/node/pull/4449
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>