Skip to content

Commit

Permalink
fixed tests broken by mqtt@4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Apr 29, 2020
1 parent 8e40a23 commit 479fe85
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/not-blocking.js
Expand Up @@ -97,8 +97,10 @@ test('do not block after a subscription', function (t) {
port: port,
keepalive: 0
}).on('error', function (err) {
clock.clearTimeout(clockId)
t.fail(err)
if (err.code !== 'ECONNRESET') {
clock.clearTimeout(clockId)
t.fail(err)
}
})

subscriber.subscribe('test', publish)
Expand Down Expand Up @@ -172,8 +174,10 @@ test('do not block with overlapping subscription', function (t) {
port: port,
keepalive: 0
}).on('error', function (err) {
clock.clearTimeout(clockId)
t.fail(err)
if (err.code !== 'ECONNRESET') {
clock.clearTimeout(clockId)
t.fail(err)
}
})

subscriber.subscribe('#', function () {
Expand Down

0 comments on commit 479fe85

Please sign in to comment.