diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2010-03-02 09:39:54 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2010-03-02 10:16:05 (GMT) |
commit | daace2df3eb80f1b62f38151f5cc3f3b355927e7 (patch) | |
tree | 434c8313e618a8caf9af28a35679aa516c80042b /tests/auto/qsslsocket | |
parent | 5a028f794fe48dc7141acedbf0e896b488bb8cd5 (diff) | |
download | Qt-daace2df3eb80f1b62f38151f5cc3f3b355927e7.zip Qt-daace2df3eb80f1b62f38151f5cc3f3b355927e7.tar.gz Qt-daace2df3eb80f1b62f38151f5cc3f3b355927e7.tar.bz2 |
QAbstractSocket: Use new faster DNS function
Use qt_qhostinfo_lookup which avoids the event loop when the DNS
result is already cached.
Reviewed-by: Thiago
Diffstat (limited to 'tests/auto/qsslsocket')
-rw-r--r-- | tests/auto/qsslsocket/qsslsocket.pro | 2 | ||||
-rw-r--r-- | tests/auto/qsslsocket/tst_qsslsocket.cpp | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/tests/auto/qsslsocket/qsslsocket.pro b/tests/auto/qsslsocket/qsslsocket.pro index 147175e..541b2d9 100644 --- a/tests/auto/qsslsocket/qsslsocket.pro +++ b/tests/auto/qsslsocket/qsslsocket.pro @@ -32,3 +32,5 @@ wince* { } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } + +requires(contains(QT_CONFIG,private_tests)) diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp index abd3237..ad2b50d 100644 --- a/tests/auto/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp @@ -54,6 +54,8 @@ #include <QNetworkProxy> #include <QAuthenticator> +#include "private/qhostinfo_p.h" + #include "../network-settings.h" Q_DECLARE_METATYPE(QAbstractSocket::SocketState) @@ -288,6 +290,8 @@ void tst_QSslSocket::init() } QNetworkProxy::setApplicationProxy(proxy); } + + qt_qhostinfo_clear_cache(); } void tst_QSslSocket::cleanup() @@ -477,7 +481,7 @@ void tst_QSslSocket::simpleConnectWithIgnore() // Start connecting socket.connectToHost(QtNetworkSettings::serverName(), 993); - QCOMPARE(socket.state(), QAbstractSocket::HostLookupState); + QVERIFY(socket.state() != QAbstractSocket::UnconnectedState); // something must be in progress enterLoop(10); // Start handshake |