Also, remove optional dependency to websockets, which is not
part of Qt 6.0 and fix compile error against unsigned comparison.
Switch default test configuration to not launch TLS brokers.
Latest COIN updates causes paho to fail in the SSL setup.
Task-number: QTBUG-88189
Change-Id: I9d31f9e54801d269122878ab4cf7541512fdbe98
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
And use an updated coin instruction file.
Change-Id: I852d38febe9ecaa86c516b7f4a0451d0f80d8011
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Some test servers might have different configurations.
For instance, mosquitto broker provides a different
default value for topic aliases.
Change-Id: I00bc9c6b27d06358a352f9c0adb04e4044666aac
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
mosquitto MQTT5 support seems to wait longer to send
will messages.
Change-Id: I2c13609e228319ce8fefc5e79d4f99bbfe0b061b
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
In certain scenarios, a user wants to manually handle the keepAlive.
Introduce autoKeepAlive as a property. If set to false, then the user
needs to handle the keepAlive by invoking requestPing.
The default for this property is true and keeps the current behavior.
Task-number: QTBUG-76782
Change-Id: I073874e6bdacf3c8d128c20431606affe1d9eeb1
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
A will message is allowed to be empty. Hence, check whether a will topic
exists to identify incorporating the last will to the connect message.
Task-number: QTBUG-76783
Change-Id: Ifb7f5467e8e7e70c6d9c050b36a35df2419f4171
Reviewed-by: hjk <hjk@qt.io>
For MQTT 5 the fake server did not send any property information. Hence,
the client (potentially) read among the buffer.
Change-Id: I58c7d1b4a1f15a0803c04495c82537f648c8a642
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Change-Id: If08d050a92db812e95a668d141d8774e56f9516e
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Previous approach to use application wide configurations can break
behavior. Also using a peerName is not sufficient in some cases. Hence,
introduce QMqttClient::connectToHostEncrypted with QSslConfiguration as
an argument, which should fulfill all needs.
[ChangeLog][QMqttClient] Added secure connection with QSslConfiguration
Task-number: QTBUG-73378
Change-Id: I3b91d2c7c02a3affd5dc67a7b486ebe78f4e1cc2
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
As agreed on the review process, using sharedSubscription(Name) is more
verbose and descriptive.
Change-Id: I81fa5d9f74ecd12d3b90d485f67b52dfb4f70bf5
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
Before failed with:
.../qtmqtt/tests/auto/cmake/build/module_includes/main.cpp:4:16: fatal error: QMqtt: No such file or directory
#include <QMqtt>
^~~~~~~
Task-number: QTBUG-68343
Change-Id: I1000f533b2b29558f3c2b0d23c64c2c621e641e5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
A user might be interested in knowing the exact state of a message while
publishing or when a message is received.
Task-number: QTPM-1453
Task-number: QTBUG-66599
Change-Id: Ibf977f76ba6078b5b525ba00b6988d4b69960176
Reviewed-by: hjk <hjk@qt.io>
VerneMQ does not send any server connection properties at all and relies
on the default values set by the standard. All other implementations
behave differently so far, mostly to set lower limits (i.e. max packet
size).
Change-Id: I01824640021651cfe752523803b9797aed197fc9
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
The standard did not mention it explicitly to be a list. However,
quoting "Multiple Subscription Identifiers will be included if the
publication is the result of a match to more than one subscription, in
this case their order is not significant" clearly indicates that
multiple subscription ids can be part of a publish message.
Change-Id: I1a45564a719847020e24aec7d0385807f3be3aa4
Reviewed-by: hjk <hjk@qt.io>
Certain properties cannot be changed while connected and hence this
should be reflected in the behavior.
Task-number: QTBUG-67176
Change-Id: Ib9baafa1ac8d99d7a071839c892187efb51491e0
Reviewed-by: hjk <hjk@qt.io>
The scheme to create a shared subscription is $share/sharename/
topicfilter. During QMqttSubscription creation, the topic gets split and
shareName is a newly introduced property to verify whether a
subscription has been shared.
Task-number: QTPM-1452
Change-Id: I99c1aa9bb3bf8db2a930ce031c1a0a4882f01bcd
Reviewed-by: hjk <hjk@qt.io>
While removing a subscription, properties can be passed. V5.0 only
specifies user properties.
Task-number: QTPM-1454
Change-Id: Id068875c1947c9479175f6e5458713e038f7454f
Reviewed-by: hjk <hjk@qt.io>
qWarning could potentially quit an application while it is easily
possible to recover from an error state. Hence avoid usage of qWarning
inside the module.
Task-number: QTBUG-69544
Change-Id: I7340f38d80e6716450fbcd0918226e9435d37daa
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
When a client connects without a client id, the server might decide to
assign one to the client. The test was disabled so far, but
QMqttServerConnectionProperties handles this properly now.
Change-Id: If013ba67aa1f08c8842b872a6125e7d2bfa6430d
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
Reviewed-by: hjk <hjk@qt.io>
The PayloadFormatIndicator is used on multiple places.
Consequently, avoid duplication of this enum and move it to
a module namespace. It is not sufficient to have it inside QMqttClient.
Change-Id: I1113de55e69a5f548cdf4feba435b806949a8153
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
Signed/unsigned comparison and an unused argument.
Change-Id: Iec452f058d6e40d24dc66261cb221b45cc89d59a
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Always use a prefix for topics inside a test class. Otherwise running
multiple tests concurrently can cause failures as test data is shared
among the broker and behavior becomes unreliable.
Task-number: QTBUG-69549
Change-Id: Ia9886826f65e8e40826fcd9a83bb8ec5a1a8e850
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
With this patch it is possible to set the version to MQTT5 and
use the same features as against version 3.1.1. No MQTT5 specific
features are enabled.
Change-Id: I129ff8a2c996d7bcc582565fccda9e38edc48c62
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
For MQTT5 testing we need to load a test configuration to specify
certain limits (i.e. packet size) and to launch multiple brokers (V3.1.1
and V5 concurrently).
Change-Id: I4532a17cf5d8fd299b77ea6cc85f98e5c8cfe32b
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Prefer QTRY_ instead of using wait and VERIFY.
Change-Id: I4699dd6e7865b2043534d624875071b0882cce45
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>