diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-04-27 03:03:26 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-04-27 03:03:26 +0200 |
commit | 96f3395cb8e2a48fef0a4018d1843e05341c4062 (patch) | |
tree | 65a207a3ae2f019b3a985c0bb5d0c86d7c62b81f /tests | |
parent | 93c3948c1319f932b1af448e3d6a6a6ab668648e (diff) | |
parent | 72257654cc6f065f64c9218864e1be5f66738e8a (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: Ia2af053a10b3b33a3f73bd3d10636e33ad2519c4
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qmqttclient/tst_qmqttclient.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/qmqttclient/tst_qmqttclient.cpp b/tests/auto/qmqttclient/tst_qmqttclient.cpp index 8aec3d5..c4da40d 100644 --- a/tests/auto/qmqttclient/tst_qmqttclient.cpp +++ b/tests/auto/qmqttclient/tst_qmqttclient.cpp @@ -486,6 +486,8 @@ public slots: } else { response += char(0); // ackFlags response += char(0); // result + if (version == QMqttClient::MQTT_5_0) + response += char(0); // No properties } qDebug() << "Fake server response:" << connectionSuccess; socket->write(response); @@ -493,6 +495,7 @@ public slots: public: QTcpServer *server; QTcpSocket *socket; + QMqttClient::ProtocolVersion version{QMqttClient::MQTT_3_1_1}; bool connectionSuccess{false}; }; @@ -509,6 +512,8 @@ void Tst_QMqttClient::reconnect_QTBUG65726() client.setHostname(QLatin1String("localhost")); client.setPort(5726); + server.version = client.protocolVersion(); + client.connectToHost(); QTRY_COMPARE(client.state(), QMqttClient::Disconnected); QTRY_COMPARE(client.error(), QMqttClient::ProtocolViolation); |