From 267acbc534095b17b139fb819ee854baf3c0f24b Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 6 Feb 2025 11:51:15 +0100 Subject: [PATCH] tst_QTextStream::stillOpenWhenAtEnd(): use QTRY_VERIFY() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test is flaky every now and then on the CI, so increase the timeout from 5s to 20s (a previous TRY_VERIFY precheck reported just shy of 10s waiting time, doubling should be™ sufficient). Amends the start of the public history. Pick-to: 6.8 6.5 6.2 5.15 Change-Id: I8e64bf8ac1576c0ac71790a03936635016b3b2b7 Reviewed-by: Mårten Nordheim (cherry picked from commit 40e65f029341a01e16dc88871eb7b24979aea9bf) Reviewed-by: Qt Cherry-pick Bot --- .../auto/corelib/serialization/qtextstream/tst_qtextstream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp b/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp index e6108f361a9..330106bd6d5 100644 --- a/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp +++ b/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp @@ -1203,7 +1203,7 @@ void tst_QTextStream::stillOpenWhenAtEnd() QTcpSocket socket; socket.connectToHost(QtNetworkSettings::imapServerName(), 143); - QVERIFY(socket.waitForReadyRead(5000)); + QTRY_VERIFY_WITH_TIMEOUT(socket.bytesAvailable() > 0, 20000); QTextStream stream2(&socket); while (!stream2.readLine().isNull()) {}