Skip to content

Commit

Permalink
fix(test): topicAliasMaximum tests (#1612)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando authored Jun 23, 2023
1 parent afc067b commit f1e5518
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ function MqttClient (streamBuilder, options) {
debug('MqttClient :: options.keepalive', options.keepalive)
debug('MqttClient :: options.reconnectPeriod', options.reconnectPeriod)
debug('MqttClient :: options.rejectUnauthorized', options.rejectUnauthorized)
debug('MqttClient :: options.properties.topicAliasMaximum', options.properties.topicAliasMaximum)
debug('MqttClient :: options.properties.topicAliasMaximum', options.properties ? options.properties.topicAliasMaximum : undefined)

this.options.clientId = (typeof options.clientId === 'string') ? options.clientId : defaultId()

Expand Down
16 changes: 12 additions & 4 deletions test/client_mqtt5.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ describe('MQTT 5.0', function () {
host: 'localhost',
port: ports.PORTAND103,
protocolVersion: 5,
topicAliasMaximum: 3
properties: {
topicAliasMaximum: 3
}
}
const client = mqtt.connect(opts)
let publishCount = 0
Expand Down Expand Up @@ -468,7 +470,9 @@ describe('MQTT 5.0', function () {
host: 'localhost',
port: ports.PORTAND103,
protocolVersion: 5,
topicAliasMaximum: 3
properties: {
topicAliasMaximum: 3
}
}
const client = mqtt.connect(opts)
const server103 = new MqttServer(function (serverClient) {
Expand Down Expand Up @@ -502,7 +506,9 @@ describe('MQTT 5.0', function () {
host: 'localhost',
port: ports.PORTAND103,
protocolVersion: 5,
topicAliasMaximum: 3
properties: {
topicAliasMaximum: 3
}
}
const client = mqtt.connect(opts)
const server103 = new MqttServer(function (serverClient) {
Expand Down Expand Up @@ -536,7 +542,9 @@ describe('MQTT 5.0', function () {
host: 'localhost',
port: ports.PORTAND103,
protocolVersion: 5,
topicAliasMaximum: 3
properties: {
topicAliasMaximum: 3
}
}
const client = mqtt.connect(opts)
const server103 = new MqttServer(function (serverClient) {
Expand Down

0 comments on commit f1e5518

Please sign in to comment.