From fcd212e7ba84647005996ceb30a3c768d401d1d6 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Mon, 19 Aug 2013 11:34:48 +0200 Subject: [PATCH] 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 --- .../access/qnetworkreply/tst_qnetworkreply.cpp | 12 +++++++----- 1 file 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 eb9ad811015..ea547ffae50 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 expectedSessionTicketLifeTimeHint = sessionPersistenceEnabled + ? QList() << 0 << 300 : QList() << -1; + QVERIFY2(expectedSessionTicketLifeTimeHint.contains( + warmupReply->sslConfiguration().sessionTicketLifeTimeHint()), + "server did not send expected session life time hint"); warmupReply->deleteLater();