Skip to content

Commit

Permalink
mqttv5: remove test for invalid TopicAlias, we validate it here
Browse files Browse the repository at this point in the history
Signed-off-by: Aarni Koskela <[email protected]>
  • Loading branch information
akx committed Dec 24, 2023
1 parent 933699a commit 23a4495
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions tests/test_mqttv5.py
Original file line number Diff line number Diff line change
Expand Up @@ -995,21 +995,6 @@ def test_request_response(self):
def test_client_topic_alias(self):
clientid = 'client topic alias'

# no server side topic aliases allowed
laclient, lacallback = self.new_client(clientid+" a")
laclient.connect(host="localhost", port=self._test_broker_port)
connack = lacallback.wait_connected()
laclient.loop_start()

publish_properties = Properties(PacketTypes.PUBLISH)
publish_properties.TopicAlias = 0 # topic alias 0 not allowed
laclient.publish(topics[0], "topic alias 0", 1,
properties=publish_properties)

# should get back a disconnect with Topic alias invalid
lacallback.wait_disconnected()
laclient.loop_stop()

connect_properties = Properties(PacketTypes.CONNECT)
connect_properties.TopicAliasMaximum = 0 # server topic aliases not allowed
connect_properties.SessionExpiryInterval = 99999
Expand Down

0 comments on commit 23a4495

Please sign in to comment.