mirror of
https://github.com/qt/qtmqtt.git
synced 2026-10-25 16:16:26 +00:00
Add runtime check for different test server
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>
This commit is contained in:
parent
824635b275
commit
e1ac865ac6
@ -235,7 +235,7 @@ void tst_QMqttConnectionProperties::maximumTopicAlias()
|
||||
client.setHostname(m_testBroker);
|
||||
client.setPort(m_port);
|
||||
|
||||
const int userMaxTopicAlias = 9;
|
||||
const int userMaxTopicAlias = 20;
|
||||
QMqttConnectionProperties userProperties;
|
||||
userProperties.setMaximumTopicAlias(userMaxTopicAlias);
|
||||
client.setConnectionProperties(userProperties);
|
||||
@ -252,6 +252,9 @@ void tst_QMqttConnectionProperties::maximumTopicAlias()
|
||||
if (serverMaxAlias == 0)
|
||||
QSKIP("Need to skip this test due to topic aliases not supported on server");
|
||||
|
||||
if (serverMaxAlias > userMaxTopicAlias)
|
||||
QSKIP("This test requires that the client contains more topic aliases than the server");
|
||||
|
||||
//qDebug() << "Server Max Alias:" << serverMaxAlias;
|
||||
//QLoggingCategory::setFilterRules("qt.mqtt.connection*=true");
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user