summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmarks')
-rw-r--r--tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp
index 9fc5807..f06c4eb 100644
--- a/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp
+++ b/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp
@@ -128,6 +128,7 @@ void tst_QTcpServer::initTestCase_data()
QTest::newRow("WithoutProxy") << false << 0;
QTest::newRow("WithSocks5Proxy") << true << int(QNetworkProxy::Socks5Proxy);
+ QTest::newRow("WithHttpProxy") << true << int(QNetworkProxy::HttpProxy);
}
void tst_QTcpServer::init()
@@ -263,6 +264,11 @@ void tst_QTcpServer::ipv4PerformanceTest()
QTcpServer server;
QVERIFY(server.listen(probeSocket.localAddress(), 0));
+ QFETCH_GLOBAL(int, proxyType);
+ //For http proxy, only the active connection can be proxied and not the server socket
+ if (proxyType == QNetworkProxy::HttpProxy)
+ QNetworkProxy::setApplicationProxy(QNetworkProxy(QNetworkProxy::HttpProxy, QtNetworkSettings::serverName(), 3128));
+
QTcpSocket clientA;
clientA.connectToHost(server.serverAddress(), server.serverPort());
QVERIFY(clientA.waitForConnected(5000));