diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-05-03 04:45:59 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2011-05-04 04:23:21 (GMT) |
commit | b9b3ced2eafe13e491d5af5ad7432733941bfd8d (patch) | |
tree | bed6c658636803ecde8ccd5eb7ee1daf7a972fe3 /tests/auto/qsslsocket | |
parent | 5b86c4abc676b36d60e6625e89535e7f4907d2b3 (diff) | |
download | Qt-b9b3ced2eafe13e491d5af5ad7432733941bfd8d.zip Qt-b9b3ced2eafe13e491d5af5ad7432733941bfd8d.tar.gz Qt-b9b3ced2eafe13e491d5af5ad7432733941bfd8d.tar.bz2 |
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
Diffstat (limited to 'tests/auto/qsslsocket')
-rw-r--r-- | tests/auto/qsslsocket/tst_qsslsocket.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp index ef5833ef..6fbedfa 100644 --- a/tests/auto/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp @@ -1517,8 +1517,8 @@ protected: // delayed start of encryption QTest::qSleep(100); QSslSocket *socket = server.socket; - Q_ASSERT(socket); - Q_ASSERT(socket->isValid()); + if (!socket || !socket->isValid()) + return; // error socket->ignoreSslErrors(); socket->startServerEncryption(); if (!socket->waitForEncrypted(2000)) |