Commit Graph

1563 Commits (8752ceef13a3c6478fee54b089fbfea1e3d8313c)

Author SHA1 Message Date
Nathan Rajlich 8752ceef13 test: make repl-autolibs check that the callback was invoked 2012-04-06 16:13:40 -07:00
Nathan Rajlich aab7cb7dfe test: fix failing test-repl.js 2012-04-06 16:13:40 -07:00
Nathan Friedly e28f77cbad readline: buffer data to only emit 'line' on '\n'
In "terminal: false" mode.

(And fire it multiple times if multiple lines arrive at once.)

This is necessary because the Windows telnet client sends every single
keystroke as it's typed.

See: http://stackoverflow.com/questions/9962197/node-js-readline-not-waiting-for-a-full-line-on-socket-connections

Closes #3059.
2012-04-06 16:13:40 -07:00
isaacs 01d46f3a20 Fix #3052 Handle errors properly in zlib 2012-04-02 13:48:10 -07:00
isaacs 90ce5b3d41 cluster: Rename 'death' back to 'exit' 2012-03-30 12:59:24 -07:00
isaacs 6aa755070a More logging in simple/test-eio-race
Travis-CI is failing on this test repeatedly, but other Linux systems
seem to be fine with it.  Alter the logging so it's more clear which
part is timing out.
2012-03-29 08:41:51 -07:00
Ben Noordhuis 11770bf5e2 test: move pummel/test-tls-fragmentation to benchmark/
Said test takes over 90 seconds on my Core 2 Duo which is too long, even for
the pummel tests.
2012-03-29 17:25:37 +02:00
Yosef Dinerstein d7c96cf289 tls: reduce memory overhead, reuse buffer
Instead of allocating a new 64KB buffer each time when checking if there is
something to transform, continue to use the same buffer. Once the buffer is
exhausted, allocate a new buffer. This solves the problem of huge allocations
when small fragments of data are processed, but will also continue to work
well with big pieces of data.
2012-03-29 17:17:15 +02:00
Ben Noordhuis daa6b95b08 test: move simple/test-crypto-dh to pummel/
The test is too slow / CPU intensive for the main test harness.
2012-03-29 17:12:26 +02:00
Ben Noordhuis 5e7cb68be9 test: remove simple/test-module-load-list
Said test adds little value and only serves to annoy me when moving around
modules. It was broken anyway: it passed inside the test runner and failed
when run from the command line thanks to the environment sniffing it did.
2012-03-29 17:11:37 +02:00
Erik Lundin 973bbecf1a typed arrays: prevent unaligned typed array views on top of buffers 2012-03-29 01:36:45 +02:00
Mikael Bourges-Sevenier 67fc1dafd0 typed arrays: add Uint8ClampedArray 2012-03-28 22:57:15 +02:00
Nathan Rajlich 208b230744 repl: add a 'useColors' option to the repl
This should only be minimally used, since the `terminal` value will usually be
what you are expecting. This option is specifically for the case where `terminal`
is false, but you still want colors to be output (or vice-versa).
2012-03-27 18:00:59 -07:00
Nathan Rajlich a33d1c959a repl: add test case verifying the repl options usage 2012-03-27 17:49:10 -07:00
Nathan Rajlich f41901cdf6 repl: make ^D emit an 'end' event on the readline instance
Also emit 'exit' on the repl when 'end' is emitted on the readline.

Fixes `node debug test/fixtures/breakpoints.js` when ^D is pressed.
2012-03-27 13:54:49 -07:00
Shigeki Ohtsu e7792e5d46 test: add test of tls.createServer(honorCipherOrder=true) 2012-03-26 05:03:51 -07:00
Shigeki Ohtsu 8727e5f2be test: add test of cleartextStream.getCipher() in tls 2012-03-23 17:09:50 +01:00
Lal Jérémy ef046bf4f6 test: generate 1024-bit keys, pacify openssl 1.0.1 2012-03-22 23:35:22 +01:00
Nathan Rajlich feaa8a41c7 cmd: add a -i / --interactive flag to force the REPL
This is the only way to spawn a node child process in REPL mode, and will
also be needed to be able to use the REPL in MinTTY.
2012-03-21 00:05:25 -07:00
isaacs d2389f8fab debug repl tests: Add visibility, remove test that times out
The 'Can't backtrace now' message takes over 10 seconds to return.
That's too much time to have to wait for a test, and when it times
out, it was causing an orphaned node process.

This cleans up the node process, and also removes the test that's
timing out, so that the case is hit less often.

Todo: Make the backtrace message come back faster.
2012-03-20 19:48:07 -07:00
Erik Lundin 4b1d492561 test: merge typed arrays tests
Merge simple/test-typed-arrays-typenames into simple/test-typed-arrays.
2012-03-21 01:59:40 +01:00
Erik Lundin f2ebf2469b test: fix simple/test-typed-arrays
* It incorrectly uses assert(a, b) instead of assert.equal(a, b), meaning all
  relevant assertions will pass regardless of whether they're supposed to when
  a == true.

* It makes the assumption that elements in typed arrays for numerical types
  spanning more than one byte, like Uint32Array, are stored little-endian first
  on all machines.

* It contains assorted mistakes like assert(Int32Array, typeof v4) (that one
  only passes thanks to point 1).
2012-03-21 01:59:33 +01:00
Alex Kocharin 415bff26fe repl: fix space autocompletion bug
Tapping <SP> + <TAB> would exit the REPL.
2012-03-20 12:27:59 +01:00
Felix Geisendörfer 18240193ba Expose http parse error codes
Currently http parse errors do not expose the error details available
from http_parser. This patch exposes the error code as `err.code`.
2012-03-19 19:00:16 -07:00
Andreas Madsen 94d337eb0f cluster: kill workers when master dies
This patch will kill the worker once it has lost its connection with the parent.
However if the worker are doing a suicide, other measures will be used.
2012-03-19 14:22:36 -07:00
Andreas Madsen d927fbc9ab cluster: add graceful disconnect support
This patch add a worker.disconnect() method there will stop the worker from accepting
new connections and then stop the IPC. This allow the worker to die graceful.
When the IPC has been disconnected a 'disconnect' event will emit.

The patch also add a cluster.disconnect() method, this will call worker.disconnect() on
all connected workers. When the workers are disconneted it will then close all server
handlers. This allow the cluster itself to self terminate in a graceful way.
2012-03-19 13:29:01 -07:00
Ben Noordhuis d8c4ecea0b test: fix race in simple/test-cluster-master-error
Said test checks that the workers shut down when the master errors but it failed
intermittently. Insert a small delay before doing the 'is dead?' check to give
the workers a chance to shut down.
2012-03-19 17:12:52 +01:00
Your Name fb47a337ba test: changed instances of == to === 2012-03-19 14:24:46 +01:00
Nathan Rajlich 11d8823791 process: add `process.config`
This is the JS representation of the `config.gypi` file that was used when
compiling node. With this information, you can tell whether the current node
binary has shared or static dependencies, or any other configuration options
that may have been used.
2012-03-15 17:15:18 -07:00
Charlie McConnell c7b8073afc child_process: Separate 'close' event from 'exit'
Currently, a child process does not emit the 'exit' event until 'close' events
have been received on all three of the child's stdio streams.  This change makes
the child object emit 'exit' when the child exits, and a new 'close' event when
all stdio streams are closed.
2012-03-15 17:07:11 -07:00
Nathan Rajlich 928ea564d1 events: don't delete the listeners array in removeListener() 2012-03-15 17:01:29 -07:00
Ben Noordhuis 761a82bc9a test: make .removeAllListeners() test more exhaustive
Also test removal of multiple listeners, it's a separate code path.
2012-03-16 00:25:42 +01:00
Ben Noordhuis 78dc13fbf9 events: don't delete the listeners array
The documentation implies that .removeAllListeners() leaves the listeners array
untouched. Make it so.
2012-03-16 00:20:10 +01:00
Ben Noordhuis f9aa01de32 test: don't let debugger listen on common.PORT
simple/test-debugger-repl has a tendency to fail and leave behind a stray
process that listens on common.PORT, making later tests fail with EADDRINUSE.
2012-03-16 00:20:10 +01:00
isaacs 702b46c80d Fix invalid timer test
Previously, setTimeout(fn, 0) would create a new Timer() object,
which has a close() method (and is a bit slower).  The recent
change to more closely emulate browser setTimeout behavior dodges
this path, so this assertion is no longer valid.
2012-03-15 14:53:17 -07:00
Ben Noordhuis 7fc835afe3 timers: handle negative or non-numeric timeout values
Follows browser behaviour by scheduling the callback on the next tick.

Fixes #593.
2012-03-15 13:56:30 -07:00
Maciej Małecki 9a35656210 test: test if forks are spawned with parent's `process.execArgv` 2012-03-15 13:48:06 -07:00
Maciej Małecki 0113f5a72d test: test `process.execArgv` 2012-03-15 13:48:05 -07:00
Shigeki Ohtsu d2fba2bf35 test: Fix path to require hello-world module 2012-03-14 11:00:52 -07:00
Łukasz Walukiewicz 677c2c112c Ignore an empty port component when parsing URLs. 2012-03-12 12:46:56 -07:00
isaacs a10cfba766 module: remove 'exited', replace 'children' array 2012-03-12 10:27:11 -07:00
ssuda 9b672bcaa2 tls: parsing multiple values of a key in ssl certificate
Fixes #2864.
2012-03-10 23:43:16 +09:00
Ben Noordhuis 8c02f9b7c8 buffer: throw from constructor if length > kMaxLength
Throw, don't abort. `new Buffer(0x3fffffff + 1)` used to bring down the process
with the following error message:

  FATAL ERROR: v8::Object::SetIndexedPropertiesToExternalArrayData() length
  exceeds max acceptable value

Fixes #2280.
2012-03-09 23:57:03 +01:00
Ben Noordhuis 296b7a580b cluster: support passing of named pipes
Fixes triggered assertion:

  Assertion failed: (0 && "bad address family"), function GetPeerName,
  file ../src/tcp_wrap.cc, line 237.

Fixes #2870.
2012-03-09 09:42:13 -08:00
Igor Zinkovsky 5ad0140f48 Emit end event only once
fixes #2888

Previously a pair of end events would be emitted if a response was
paused/resumed, and the underlying socket was closed while the
response was paused
2012-03-07 13:37:39 -08:00
ssuda b72d43cbf9 dgram: fix when we call .close() inside 'listening' 2012-03-06 22:20:23 +01:00
Nathan Rajlich 07c886f944 process: add `process.hrtime()`
This commit adds a high-resolution timer function.
2012-03-06 20:43:55 +01:00
Dmitry Nizovtsev 1e9bcf26ce net, http, https: add localAddress option
Binds to a local address before making the outgoing connection.
2012-03-06 13:35:49 +01:00
Igor Zinkovsky 9ea5a4c468 fix simple/test-process-argv-0 on windows 2012-03-05 16:51:04 -08:00
Shigeki Ohtsu 59c3923672 process: show detailed error message in process.dlopen() 2012-03-06 01:34:39 +01:00