summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsslsocket
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2011-02-23 17:12:44 (GMT)
committerShane Kearns <shane.kearns@accenture.com>2011-02-24 16:45:41 (GMT)
commit6a8a70b434c61bc39e4aad0036012e78fa690b1d (patch)
treed5b38e839e11e47539fcdf758b61ef1fdd60c681 /tests/auto/qsslsocket
parent8d1ee3335f4c1bf262fb3a85fd4cc7e837129b8c (diff)
downloadQt-6a8a70b434c61bc39e4aad0036012e78fa690b1d.zip
Qt-6a8a70b434c61bc39e4aad0036012e78fa690b1d.tar.gz
Qt-6a8a70b434c61bc39e4aad0036012e78fa690b1d.tar.bz2
Fix qsslsocket test crashes
Convert assertions to failure, increase heap size to allow creating 10MB buffers without std::bad_alloc exception or memory allocation error from openssl. Reviewed-by: Markus Goetz
Diffstat (limited to 'tests/auto/qsslsocket')
-rw-r--r--tests/auto/qsslsocket/qsslsocket.pro2
-rw-r--r--tests/auto/qsslsocket/tst_qsslsocket.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/qsslsocket/qsslsocket.pro b/tests/auto/qsslsocket/qsslsocket.pro
index aeeae8f..154f9ca 100644
--- a/tests/auto/qsslsocket/qsslsocket.pro
+++ b/tests/auto/qsslsocket/qsslsocket.pro
@@ -23,7 +23,7 @@ wince* {
DEPLOYMENT += certFiles
} else:symbian {
DEFINES += QSSLSOCKET_CERTUNTRUSTED_WORKAROUND
- TARGET.EPOCHEAPSIZE="0x100 0x1000000"
+ TARGET.EPOCHEAPSIZE="0x100 0x3000000"
TARGET.CAPABILITY=NetworkServices
certFiles.files = certs ssl.tar.gz
diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp
index 8177d29..9a98712 100644
--- a/tests/auto/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp
@@ -541,7 +541,7 @@ void tst_QSslSocket::sslErrors()
}
#ifdef QSSLSOCKET_CERTUNTRUSTED_WORKAROUND
- if (output.last() == QSslError::CertificateUntrusted)
+ if (output.count() && output.last() == QSslError::CertificateUntrusted)
output.takeLast();
#endif
QCOMPARE(output, expected);
@@ -1417,8 +1417,8 @@ protected:
// delayed start of encryption
QTest::qSleep(100);
QSslSocket *socket = server.socket;
- Q_ASSERT(socket);
- Q_ASSERT(socket->isValid());
+ QVERIFY(socket);
+ QVERIFY(socket->isValid());
socket->ignoreSslErrors();
socket->startServerEncryption();
if (!socket->waitForEncrypted(2000))