summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2011-03-08 14:17:47 (GMT)
committerShane Kearns <shane.kearns@accenture.com>2011-03-09 13:18:03 (GMT)
commit0b0247e675e3e8054e41de41c716d8f915e18629 (patch)
tree42f2555df9169adba4a1fde84efebe0623c0b46d
parentf89c25376651a87501e0c5980d289992b0fbe1c8 (diff)
downloadQt-0b0247e675e3e8054e41de41c716d8f915e18629.zip
Qt-0b0247e675e3e8054e41de41c716d8f915e18629.tar.gz
Qt-0b0247e675e3e8054e41de41c716d8f915e18629.tar.bz2
tst_qtcpsocket - skip proxies for localhost testing
There is no point to test the proxy setting for connections to localhost, because the proxy is bypassed anyway. Skipping running the same test case multiple times makes this test complete a bit faster. Reviewed-by: Markus Goetz
-rw-r--r--tests/auto/qtcpsocket/tst_qtcpsocket.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
index b21de49..b972130 100644
--- a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
@@ -981,6 +981,9 @@ void tst_QTcpSocket::disconnectWhileConnecting_data()
void tst_QTcpSocket::disconnectWhileConnecting()
{
QFETCH(QByteArray, data);
+ QFETCH_GLOBAL(bool, setProxy);
+ if (setProxy)
+ return; //proxy not useful for localhost test case
QTcpServer server;
QVERIFY(server.listen(QHostAddress::LocalHost));
@@ -1106,6 +1109,9 @@ void tst_QTcpSocket::disconnectWhileConnectingNoEventLoop_data()
void tst_QTcpSocket::disconnectWhileConnectingNoEventLoop()
{
QFETCH(QByteArray, data);
+ QFETCH_GLOBAL(bool, setProxy);
+ if (setProxy)
+ return; //proxy not useful for localhost test case
QScopedPointer<ReceiverThread, ReceiverThread> thread (new ReceiverThread);
QVERIFY(thread->listen());
@@ -1646,6 +1652,9 @@ private slots:
//----------------------------------------------------------------------------------
void tst_QTcpSocket::remoteCloseError()
{
+ QFETCH_GLOBAL(bool, setProxy);
+ if (setProxy)
+ return; //proxy not useful for localhost test case
RemoteCloseErrorServer server;
QVERIFY(server.listen(QHostAddress::LocalHost));
@@ -1956,6 +1965,9 @@ void tst_QTcpSocket::linuxKernelBugLocalSocket()
//----------------------------------------------------------------------------------
void tst_QTcpSocket::abortiveClose()
{
+ QFETCH_GLOBAL(bool, setProxy);
+ if (setProxy)
+ return; //proxy not useful for localhost test case
QTcpServer server;
QVERIFY(server.listen(QHostAddress::LocalHost));
connect(&server, SIGNAL(newConnection()), this, SLOT(exitLoopSlot()));
@@ -1994,6 +2006,9 @@ void tst_QTcpSocket::abortiveClose_abortSlot()
//----------------------------------------------------------------------------------
void tst_QTcpSocket::localAddressEmptyOnBSD()
{
+ QFETCH_GLOBAL(bool, setProxy);
+ if (setProxy)
+ return; //proxy not useful for localhost test case
QTcpServer server;
QVERIFY(server.listen(QHostAddress::LocalHost));
@@ -2264,6 +2279,9 @@ void tst_QTcpSocket::moveToThread0()
void tst_QTcpSocket::increaseReadBufferSize()
{
+ QFETCH_GLOBAL(bool, setProxy);
+ if (setProxy)
+ return; //proxy not useful for localhost test case
QTcpServer server;
QTcpSocket *active = newSocket();
connect(active, SIGNAL(readyRead()), SLOT(exitLoopSlot()));