From d7e10b2a71f1fa196472544309dc59488229ebeb Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Wed, 18 May 2011 10:26:00 +1000 Subject: [PATCH] Remove Q_ASSERT from qsslsocket autotest. 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp index b508d47..507af5e 100644 --- a/tests/auto/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp @@ -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)) -- 2.7.4