diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2011-05-26 12:56:02 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2011-06-13 13:08:32 (GMT) |
commit | 63729b15d4e08401d383f4d38eee6a290e8ba894 (patch) | |
tree | 899b233e1099b211b2ba42106a699699be0b642f /tests/benchmarks | |
parent | 9f5809d921f3380c36f482e66184039ec0b0ea93 (diff) | |
download | Qt-63729b15d4e08401d383f4d38eee6a290e8ba894.zip Qt-63729b15d4e08401d383f4d38eee6a290e8ba894.tar.gz Qt-63729b15d4e08401d383f4d38eee6a290e8ba894.tar.bz2 |
Also test http proxy in the QTcpServer benchmark
Test the http socket engine:
The test server's proxy will connect to the listening socket on the DUT
rather than a listening socket on the proxy server as in the SOCKS5 case.
Reviewed-by: Markus Goetz
Diffstat (limited to 'tests/benchmarks')
-rw-r--r-- | tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp | 6 |
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)); |