diff options
author | Maurice Kalinowski <maurice.kalinowski@qt.io> | 2020-05-01 22:27:39 +0200 |
---|---|---|
committer | Maurice Kalinowski <maurice.kalinowski@qt.io> | 2020-05-06 08:30:54 +0200 |
commit | e1ac865ac6c700bd661b8956d95305562cd67285 (patch) | |
tree | 725401198da978f694a40c4eaf51e89360f94489 | |
parent | 824635b27567276fe243554d0ba722152183986b (diff) |
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>
-rw-r--r-- | tests/auto/qmqttconnectionproperties/tst_qmqttconnectionproperties.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/qmqttconnectionproperties/tst_qmqttconnectionproperties.cpp b/tests/auto/qmqttconnectionproperties/tst_qmqttconnectionproperties.cpp index f08adcd..7fbd214 100644 --- a/tests/auto/qmqttconnectionproperties/tst_qmqttconnectionproperties.cpp +++ b/tests/auto/qmqttconnectionproperties/tst_qmqttconnectionproperties.cpp @@ -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"); |