Remove Q_ASSERT from qsslsocket autotest.
authorRohan McGovern <rohan.mcgovern@nokia.com>
Wed, 18 May 2011 00:26:00 +0000 (10:26 +1000)
committerRohan McGovern <rohan.mcgovern@nokia.com>
Wed, 18 May 2011 00:46:43 +0000 (10:46 +1000)
Make the server thread exit early if the socket is invalid.  This will
make the test fail gracefully instead of crashing.

Change-Id: Ia9564c94dd32d65e6e9bdb4a2410f1512409546c
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit b9b3ced2eafe13e491d5af5ad7432733941bfd8d)

Conflicts:

tests/auto/qsslsocket/tst_qsslsocket.cpp

tests/auto/qsslsocket/tst_qsslsocket.cpp

index b508d47..507af5e 100644 (file)
@@ -1565,8 +1565,8 @@ protected:
         // delayed start of encryption
         QTest::qSleep(100);
         QSslSocket *socket = server.socket;
-        QVERIFY(socket);
-        QVERIFY(socket->isValid());
+        if (!socket || !socket->isValid())
+            return;             // error
         socket->ignoreSslErrors();
         socket->startServerEncryption();
         if (!socket->waitForEncrypted(2000))