If the fs.open method is modified via AOP-style extension, in between
the creation of an fs.WriteStream and the processing of its action
queue, then the test of whether or not the method === fs.open will fail,
because fs.open has been replaced.
The solution is to save a reference to fs.open on the stream itself when
the action is placed in the queue.
This fixesisaacs/node-graceful-fs#6.
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.
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.
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.
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).
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.
* 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).
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.
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.
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.
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.
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.
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.
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.