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();