summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPeter Hartmann <phartmann@blackberry.com>2013-08-19 11:34:48 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-21 14:48:04 +0200
commitfcd212e7ba84647005996ceb30a3c768d401d1d6 (patch)
tree6846fbf3daadcf8d16e0443ae468c79f989b0b24 /tests
parent6be9cb2068fcf21c8957e5aed4c235efc2eb6b2e (diff)
QNetworkReply auto test: adapt to new session life time
... supported on the new test server. Once the new server image is in place, we can only allow for the new life time hint of 300 seconds. Task-number: QTBUG-33040 Change-Id: Id6ad9983789cc6badf3fc2f6628bf79379988201 Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
index eb9ad81101..ea547ffae5 100644
--- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -6040,11 +6040,13 @@ void tst_QNetworkReply::sslSessionSharingFromPersistentSession()
QByteArray sslSession = warmupReply->sslConfiguration().session();
QCOMPARE(!sslSession.isEmpty(), sessionPersistenceEnabled);
- // test server sends a life time hint of 0, which is not common
- // practice; however it is good enough because the default is -1
- int expectedSessionTicketLifeTimeHint = sessionPersistenceEnabled ? 0 : -1;
- QCOMPARE(warmupReply->sslConfiguration().sessionTicketLifeTimeHint(),
- expectedSessionTicketLifeTimeHint);
+ // test server sends a life time hint of 0 (old server) or 300 (new server),
+ // without session ticket we get -1
+ QList<int> expectedSessionTicketLifeTimeHint = sessionPersistenceEnabled
+ ? QList<int>() << 0 << 300 : QList<int>() << -1;
+ QVERIFY2(expectedSessionTicketLifeTimeHint.contains(
+ warmupReply->sslConfiguration().sessionTicketLifeTimeHint()),
+ "server did not send expected session life time hint");
warmupReply->deleteLater();