1
0
mirror of https://github.com/qt/qtmqtt.git synced 2026-10-25 16:16:26 +00:00
qtmqtt/tests/auto
Even Oscar Andersen c383083270 Make sure unsubscribe followed by subscribe returns new subscription
Since we could only have one subscription for each topic it was
not possible to return a new subscription when a subscription
request comes in on a topic that is scheduled for destruction.

We solve this by switching to a QMultiHash for the active
subscriptions, allowing more then one subscription for a
given topic. However, at most one of these subscriptions
are not present in the list of subscriptions scheduled to
be unsubscribed

This patch also changes multiple unsubscribes to the
same topic. Earlier all would return true, and
m_pendingUnsubscriptions would be updated for all
requests.
The new behavior is that only the first unsubscribe
is acted upon. Furthere requests will return false.

Fixes: QTBUG-135653
Pick-to: 6.8 6.9 6.10
Change-Id: I5a79efb68b3191e185325a89cc2042c773bb5c12
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2025-06-24 13:14:36 +02:00
..
cmake Enable CMake autotests 2024-01-24 14:16:47 +01:00
conformance Add tests for websocket support for mqtt 2025-01-29 15:54:55 +01:00
qmqttclient Add tests for websocket support for mqtt 2025-01-29 15:54:55 +01:00
qmqttconnectionproperties Add tests for websocket support for mqtt 2025-01-29 15:54:55 +01:00
qmqttcontrolpacket Add tests for websocket support for mqtt 2025-01-29 15:54:55 +01:00
qmqttlastwillproperties Add tests for websocket support for mqtt 2025-01-29 15:54:55 +01:00
qmqttpublishproperties Add tests for websocket support for mqtt 2025-01-29 15:54:55 +01:00
qmqttsubscription Make sure unsubscribe followed by subscribe returns new subscription 2025-06-24 13:14:36 +02:00
qmqttsubscriptionproperties Add tests for websocket support for mqtt 2025-01-29 15:54:55 +01:00
qmqtttopicfilter Add tests for websocket support for mqtt 2025-01-29 15:54:55 +01:00
qmqtttopicname Add tests for websocket support for mqtt 2025-01-29 15:54:55 +01:00
CMakeLists.txt Enable CMake autotests 2024-01-24 14:16:47 +01:00