diff options
Diffstat (limited to 'tests/auto/network')
-rw-r--r-- | tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp | 12 |
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(); |