Skip to content

Commit

Permalink
fix: flaky auth packet test
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Jul 14, 2023
1 parent 02c395e commit 1a9e1e6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/client_mqtt5.js
Original file line number Diff line number Diff line change
Expand Up @@ -617,16 +617,16 @@ describe('MQTT 5.0', function () {

it('auth packet', function (done) {
this.timeout(15000)
server.once('client', function (serverClient) {
const opts = { host: 'localhost', port: ports.PORTAND115, protocolVersion: 5, properties: { authenticationMethod: 'json' }, authPacket: {} }
const client = mqtt.connect(opts)
server.once('client', function (c) {
console.log('server received client')
serverClient.on('auth', function (packet) {
c.on('auth', function (packet) {
console.log('serverClient received auth: packet %o', packet)
serverClient.end(done)
client.end(done)
})
})
const opts = { host: 'localhost', port: ports.PORTAND115, protocolVersion: 5, properties: { authenticationMethod: 'json' }, authPacket: {} }
console.log('calling mqtt connect')
mqtt.connect(opts)
})

it('Maximum Packet Size', function (done) {
Expand Down

0 comments on commit 1a9e1e6

Please sign in to comment.