Skip to content

Commit

Permalink
Merge 2cee5d1 into abcecd3
Browse files Browse the repository at this point in the history
  • Loading branch information
gnought committed Jul 20, 2019
2 parents abcecd3 + 2cee5d1 commit 952be1a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions test/regr-21.js
Expand Up @@ -19,14 +19,15 @@ test('after an error, outstanding packets are discarded', function (t) {
s.broker.mq.on('hello', function (msg, cb) {
t.pass('first msg received')
s.inStream.destroy(new Error('something went wrong'))
setImmediate(cb)
})

process.nextTick(function () {
s.inStream.write(packet)
setImmediate(function () {
cb()
setImmediate(() => {
packet.topic = 'foo'
s.inStream.write(packet)
s.inStream.write(packet)
})
})
s.broker.mq.on('foo', function (msg, cb) {
t.fail('msg received')
})
s.inStream.write(packet)
})

0 comments on commit 952be1a

Please sign in to comment.