Skip to content

Commit

Permalink
Workaround for node versions older than 20
Browse files Browse the repository at this point in the history
  • Loading branch information
fbbdev committed Jul 15, 2023
1 parent fdf5538 commit cd5290a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/mocha/integration/stdin_backpressure.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,16 @@ function timeoutSignal(ms) {
describe('stdin backpressuring server', function setup() {
let httpURL;

stream.setDefaultHighWaterMark(false, 3);
// Monkey-patch for different highWaterMark
const oldDuplex = stream.Duplex;
function newDuplex(options) {
options = options || {};
options.readableHighWaterMark = 3;
oldDuplex.call(this, options);
}
newDuplex.prototype = oldDuplex.prototype;
newDuplex.prototype.constructor = newDuplex;
stream.Duplex = newDuplex;

before(function startFcgiServer(done) {
function sendError(res, err) {
Expand Down

0 comments on commit cd5290a

Please sign in to comment.