Skip to content

Commit

Permalink
Merge pull request #283 from geek/master
Browse files Browse the repository at this point in the history
Add test for timeout of connection
  • Loading branch information
geek committed Dec 21, 2015
2 parents c9e1c39 + aee2c52 commit 8c03862
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/transport.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,15 @@ describe('transport', function () {
})
})

it('handles timeout from client connecting', function (done) {
var seneca = Seneca({ log: 'silent', timeout: 50 }).client({ port: 1 })
seneca.act({ cmd: 'test' }, function (err) {
expect(err).to.exist()
expect(err.message).to.contain('TIMEOUT')
done()
})
})


it('transport-balance-exact', function (done) {
var bt = make_balance_transport()
Expand Down

0 comments on commit 8c03862

Please sign in to comment.