Skip to content

Commit

Permalink
Don't run large buf test on 0.12 inline stream
Browse files Browse the repository at this point in the history
  • Loading branch information
davedoesdev committed Jul 1, 2016
1 parent 4c012ca commit 7cb371c
Showing 1 changed file with 24 additions and 26 deletions.
50 changes: 24 additions & 26 deletions test/test_inline_stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,43 +433,41 @@ describe('inline stream', function ()
}
});

it('should support sending large buffers', function (cb)
// https://github.com/nodejs/node/pull/7292 isn't on 0.12
if (parseFloat(process.versions.node) > 0.12)
{
this.timeout(60 * 1000);

var buf = new Buffer(128 * 1024);
buf.fill('a');

rmux.once('handshake', function (duplex)
it('should support sending large buffers', function (cb)
{
var bufs = [];
var buf = new Buffer(128 * 1024);
buf.fill('a');

duplex.on('readable', function ()
rmux.once('handshake', function (duplex)
{
while (true)
var bufs = [];

duplex.on('readable', function ()
{
var data = this.read();
if (data === null)
while (true)
{
break;
var data = this.read();
if (data === null)
{
break;
}
bufs.push(data);
}
bufs.push(data);
}
});
});

duplex.on('end', function ()
{
expect(Buffer.concat(bufs).toString()).to.equal(buf.toString());
cb();
duplex.on('end', function ()
{
expect(Buffer.concat(bufs).toString()).to.equal(buf.toString());
cb();
});
});
});

lmux.multiplex().end(buf);
});
lmux.multiplex().end(buf);
});

// https://github.com/nodejs/node/pull/7292 isn't on 0.12
if (parseFloat(process.versions.node) > 0.12)
{
it('should support sending large buffers with delayed handshake',
function (cb)
{
Expand Down

0 comments on commit 7cb371c

Please sign in to comment.