From 8bc09e9db39856af209ea15e230315f365767b0b Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 17 Jun 2024 09:30:09 +0200 Subject: [PATCH] tst_QNetworkReply: port _WITH_TIMEOUT calls to chrono literals Dogfooding the new 6.8 feature. Change-Id: Ic4c371896fcab0c94cef76341a6ef97763127968 Reviewed-by: Ahmad Samir (cherry picked from commit 34089abeeac14a6437851530aa25f8b31a22acf1) Reviewed-by: Qt Cherry-pick Bot --- .../auto/network/access/qnetworkreply/tst_qnetworkreply.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp index 045e0713bd2..53f997a08cb 100644 --- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -10340,7 +10340,7 @@ void tst_QNetworkReply::contentEncodingBigPayload() request.setDecompressedSafetyCheckThreshold(-1); QNetworkReplyPtr reply(manager.get(request)); - QTRY_VERIFY2_WITH_TIMEOUT(reply->isFinished(), qPrintable(reply->errorString()), 15000); + QTRY_VERIFY2_WITH_TIMEOUT(reply->isFinished(), qPrintable(reply->errorString()), 15s); QCOMPARE(reply->error(), QNetworkReply::NoError); QFETCH(qint64, expectedSize); @@ -10465,7 +10465,7 @@ void tst_QNetworkReply::contentEncodingError() QUrl(QLatin1String("http://localhost:%1").arg(QString::number(server.serverPort())))); QNetworkReplyPtr reply(manager.get(request)); - QTRY_VERIFY2_WITH_TIMEOUT(reply->isFinished(), qPrintable(reply->errorString()), 15000); + QTRY_VERIFY2_WITH_TIMEOUT(reply->isFinished(), qPrintable(reply->errorString()), 15s); QTEST(reply->error(), "expectedError"); } @@ -10535,7 +10535,7 @@ void tst_QNetworkReply::notFoundWithCompression() QUrl(QLatin1String("http://localhost:%1").arg(QString::number(server.serverPort())))); QNetworkReplyPtr reply(manager.get(request)); - QTRY_VERIFY2_WITH_TIMEOUT(reply->isFinished(), qPrintable(reply->errorString()), 15000); + QTRY_VERIFY2_WITH_TIMEOUT(reply->isFinished(), qPrintable(reply->errorString()), 15s); QCOMPARE(reply->error(), QNetworkReply::ContentNotFoundError); QFETCH(QByteArray, expected);