summaryrefslogtreecommitdiff
path: root/test/parallel/test-stream-pipe-await-drain-push-while-write.js
AgeCommit message (Collapse)Author
2019-08-26stream: fix readable state `awaitDrain` increase in recursionran
PR-URL: https://github.com/nodejs/node/pull/27572 Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-05-25test: remove string literal from strictEqualAbhimanyuVashisht
Remove obsolete string literals from `assert.strictEqual()` calls in test/parallel/test-stream-pip-await-drain-push-while-write.js. PR-URL: https://github.com/nodejs/node/pull/20920 Refs: https://www.nodetodo.org/getting-started Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-01-10stream: always defer 'readable' with nextTickMatteo Collina
Emit 'readable' always in the next tick, resulting in a single call to _read() per microtick. This removes the need for the user to implement buffering if they wanted to call this.push() multiple times in an asynchronous fashion, as this.push() triggers this._read() call. PR-URL: https://github.com/nodejs/node/pull/17979 Fixes: https://github.com/nodejs/node/issues/3203 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2017-06-15test: change deprecated method to recommendedRich Trott
In non-buffer tests, change usage of the Buffer constructor to one of the recommended alternatives. PR-URL: https://github.com/nodejs/node/pull/13649 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Brian White <mscdex@mscdex.net>
2017-01-18test: tests for _readableStream.awaitDrainMark
Fixes: https://github.com/nodejs/node/issues/8684 PR-URL: https://github.com/nodejs/node/pull/8914 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2016-06-16stream: ensure awaitDrain is increased onceDavid Halls
Guard against the call to write() inside pipe's ondata pushing more data back onto the Readable, thus causing ondata to be called again. This is fine but results in awaitDrain being increased more than once. The problem with that is when the destination does drain, only a single 'drain' event is emitted, so awaitDrain in this case will never reach zero and we end up with a permanently paused stream. Fixes: https://github.com/nodejs/node/issues/7278 PR-URL: https://github.com/nodejs/node/pull/7292 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>