summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPeter Hartmann <phartmann@blackberry.com>2013-12-10 11:15:34 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-10 15:14:22 +0100
commitaa3eaf9d2ec4927df51e7d773a66f68ec5e4fce9 (patch)
tree2fbf6d9e3ead8984a2a8eb7c6584639511639f7a /tests
parent7eecbb07184bc8b2c5e7645af2805ba0a2488082 (diff)
QUdpSocket auto test: disable Socks5 over UDP for new test server
... because they fail on the new test server. This commit can be reverted once the Socks5 socket engine is fixed. Task-number: QTBUG-35490 Change-Id: I85635d4b44d26168d40a56b7a121693297564f0f Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com> Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
index 8de66f0f2c..f08afaa9a5 100644
--- a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
+++ b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
@@ -48,6 +48,7 @@
#include <qudpsocket.h>
#include <qhostaddress.h>
#include <qhostinfo.h>
+#include <qtcpsocket.h>
#include <qmap.h>
#include <QNetworkProxy>
#include <QNetworkInterface>
@@ -144,11 +145,25 @@ tst_QUdpSocket::~tst_QUdpSocket()
void tst_QUdpSocket::initTestCase_data()
{
+ // hack: we only enable the Socks5 over UDP tests on the old
+ // test server, because they fail on the new one. See QTBUG-35490
+ bool newTestServer = true;
+ QTcpSocket socket;
+ socket.connectToHost(QtNetworkSettings::serverName(), 22);
+ if (socket.waitForConnected(10000)) {
+ socket.waitForReadyRead(5000);
+ QByteArray ba = socket.readAll();
+ if (ba.startsWith("SSH-2.0-OpenSSH_5.8p1"))
+ newTestServer = false;
+ socket.disconnectFromHost();
+ }
+
QTest::addColumn<bool>("setProxy");
QTest::addColumn<int>("proxyType");
QTest::newRow("WithoutProxy") << false << 0;
- QTest::newRow("WithSocks5Proxy") << true << int(QNetworkProxy::Socks5Proxy);
+ if (!newTestServer)
+ QTest::newRow("WithSocks5Proxy") << true << int(QNetworkProxy::Socks5Proxy);
#ifndef QT_NO_BEARERMANAGEMENT
netConfMan = new QNetworkConfigurationManager(this);